Skip to content

Commit a9bd888

Browse files
Merge pull request #46 from ibanity/improve-pir
Add customerIpAddress and locale in create payment initiation request.
2 parents 4e70c78 + 73c0d43 commit a9bd888

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

src/main/java/com/ibanity/apis/client/products/xs2a/mappers/PaymentInitiationRequestMapper.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ public static PaymentInitiationRequest getRequestMapping(PaymentInitiationReques
3131
.debtorAccountReference(query.getDebtorAccountReference())
3232
.debtorAccountReferenceType(query.getDebtorAccountReferenceType())
3333
.debtorName(query.getDebtorName())
34+
.customerIpAddress(query.getCustomerIpAddress())
35+
.locale(query.getLocale())
3436
.build();
3537
}
3638

src/main/java/com/ibanity/apis/client/products/xs2a/models/create/PaymentInitiationRequestCreationQuery.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ public final class PaymentInitiationRequestCreationQuery {
4141
private String creditorAgentType;
4242

4343
private String redirectUri;
44+
private String locale;
45+
private String customerIpAddress;
4446

4547
@Builder.Default
4648
private Map<String, String> additionalHeaders = emptyMap();

src/test/java/com/ibanity/apis/client/products/xs2a/services/impl/PaymentInitiationRequestServiceImplTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ void create() throws Exception {
6060
PaymentInitiationRequestCreationQuery.builder()
6161
.customerAccessToken(CUSTOMER_TOKEN_REFERENCE)
6262
.financialInstitutionId(FINANCIAL_INSTITUTION_ID)
63+
.customerIpAddress("1.2.3.4")
64+
.locale("fr")
6365
.build();
6466

6567
when(ibanityHttpClient.post(buildUri(PIR_ENDPOINT_FOR_CREATE), mapRequest(requestCreationQuery), emptyMap(), CUSTOMER_TOKEN_REFERENCE))
@@ -127,6 +129,8 @@ private RequestApiModel mapRequest(PaymentInitiationRequestCreationQuery query)
127129
.debtorAccountReference(query.getDebtorAccountReference())
128130
.debtorAccountReferenceType(query.getDebtorAccountReferenceType())
129131
.debtorName(query.getDebtorName())
132+
.customerIpAddress(query.getCustomerIpAddress())
133+
.locale(query.getLocale())
130134
.build();
131135
return RequestApiModel.builder()
132136
.data(

0 commit comments

Comments
 (0)