@@ -14,6 +14,8 @@ public class Environment {
1414
1515 private final URI hppUri ;
1616
17+ private final URI hp2Uri ;
18+
1719 private static final String PAYMENTS_API_DEFAULT_VERSION = "v3" ;
1820
1921 /**
@@ -24,7 +26,8 @@ public static Environment development() {
2426 return new Environment (
2527 URI .create ("https://auth.t7r.dev" ),
2628 URI .create (MessageFormat .format ("https://api.t7r.dev/{0}/" , PAYMENTS_API_DEFAULT_VERSION )),
27- URI .create ("https://payment.t7r.dev" ));
29+ URI .create ("https://payment.t7r.dev" ),
30+ URI .create ("https://app.t7r.dev" ));
2831 }
2932
3033 /**
@@ -36,7 +39,8 @@ public static Environment sandbox() {
3639 URI .create ("https://auth.truelayer-sandbox.com" ),
3740 URI .create (
3841 MessageFormat .format ("https://api.truelayer-sandbox.com/{0}/" , PAYMENTS_API_DEFAULT_VERSION )),
39- URI .create ("https://payment.truelayer-sandbox.com" ));
42+ URI .create ("https://payment.truelayer-sandbox.com" ),
43+ URI .create ("https://app.truelayer-sandbox.com" ));
4044 }
4145
4246 /**
@@ -47,17 +51,19 @@ public static Environment live() {
4751 return new Environment (
4852 URI .create ("https://auth.truelayer.com" ),
4953 URI .create (MessageFormat .format ("https://api.truelayer.com/{0}/" , PAYMENTS_API_DEFAULT_VERSION )),
50- URI .create ("https://payment.truelayer.com" ));
54+ URI .create ("https://payment.truelayer.com" ),
55+ URI .create ("https://app.truelayer.com" ));
5156 }
5257
5358 /**
5459 * Custom environment builder. Meant for testing purposes
5560 * @param authApiUri the authentication API endpoint
5661 * @param paymentsApiUri the Payments API endpoint
5762 * @param hppUri the <i>Hosted Payment Page</i> endpoint
63+ * @param hp2Uri the new <i>Hosted Payment Page</i> endpoint
5864 * @return a custom environment object
5965 */
60- public static Environment custom (URI authApiUri , URI paymentsApiUri , URI hppUri ) {
61- return new Environment (authApiUri , paymentsApiUri , hppUri );
66+ public static Environment custom (URI authApiUri , URI paymentsApiUri , URI hppUri , URI hp2Uri ) {
67+ return new Environment (authApiUri , paymentsApiUri , hppUri , hp2Uri );
6268 }
6369}
0 commit comments