Skip to content

Commit 8341851

Browse files
v24.2.0 (#50)
1 parent d607d4f commit 8341851

98 files changed

Lines changed: 4382 additions & 1120 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ PAYMENT_GATEWAY_MERCHANT_ID =
99
PAYMENT_GATEWAY_MERCHANT_KEY_ID =
1010
PAYMENT_GATEWAY_MERCHANT_SECRET_KEY =
1111

12+
PAYMENT_GATEWAY_SHIPPING_METHOD =
13+
1214
PAYMENT_GATEWAY_TARGET_ORIGINS =
1315
PAYMENT_GATEWAY_VERIFICATION_KEY =
1416
PAYMENT_GATEWAY_CC_ALLOWED_CARD_NETWORKS =

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ src/**.js
88
coverage
99
*.log
1010
yarn.lock
11+
.DS_Store

docs/API-Extension-Setup.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Variables that begin with 'CT' prefix are Commercetools project specific propert
2222
| PAYMENT_GATEWAY_MERCHANT_ID | Your Cybersource merchant Id | Provided by Cybersource |
2323
| PAYMENT_GATEWAY_MERCHANT_KEY_ID | Id of a Cybersource shared secret key to be used for HTTP Signature authentication | Created in [key-Creation\#Cybersource](Key-Creation.md#Cybersource). |
2424
| PAYMENT_GATEWAY_MERCHANT_SECRET_KEY | Value of a Cybersource shared secret key to be used for HTTP Signature authentication | Created in [key-Creation\#Cybersource](key-Creation.md#Cybersource). |
25+
| PAYMENT_GATEWAY_SHIPPING_METHOD | Shipping method to be passed in shipTo.method field | The value should be any of the following: lowcost, sameday, oneday, twoday, threeday, pickup, other or none. |
2526
| PAYMENT_GATEWAY_TARGET_ORIGINS | Base URLs where your frontend will be accessible | Used for Card payment method. Comma separated value without any spaces |
2627
| PAYMENT_GATEWAY_VERIFICATION_KEY | Used to check Flex tokens for tampering | Use <b>Openssl -rand64 32 </b>command to generate verification key |
2728
| PAYMENT_GATEWAY_CC_ALLOWED_CARD_NETWORKS | csv(comma separated value) of the card networks | If not specified extension will support all the card networks(VISA, MASTERCARD, AMEX, DISCOVER, MAESTRO, CUP, JCB, CARTESBANCAIRES & DINERSCLUB) by default. Case sensitive. Accepts block letters only without any spaces – eg: VISA,AMEX |

docs/Commercetools-Setup.md

Lines changed: 48 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -111,44 +111,54 @@ Fields
111111

112112
Fields
113113

114-
| Name | Type | Required |
115-
| ------------------------------------ | ------- | -------- |
116-
| isv_token | String | false |
117-
| isv_tokenAlias | String | false |
118-
| isv_savedToken | String | false |
119-
| isv_tokenVerificationContext | String | false |
120-
| isv_tokenCaptureContextSignature | String | false |
121-
| isv_cardType | String | false |
122-
| isv_maskedPan | String | false |
123-
| isv_cardExpiryMonth | String | false |
124-
| isv_cardExpiryYear | String | false |
125-
| isv_requestJwt | String | false |
126-
| isv_responseJwt | String | false |
127-
| isv_payerAuthenticationRequired | Boolean | false |
128-
| isv_payerAuthenticationTransactionId | String | false |
129-
| isv_payerAuthenticationAcsUrl | String | false |
130-
| isv_payerAuthenticationPaReq | String | false |
131-
| isv_acceptHeader | String | false |
132-
| isv_userAgentHeader | String | false |
133-
| isv_deviceFingerprintId | String | false |
134-
| isv_customerIpAddress | String | false |
135-
| isv_cardinalReferenceId | String | false |
136-
| isv_deviceDataCollectionUrl | String | false |
137-
| isv_stepUpUrl | String | false |
138-
| isv_applePayValidationUrl | String | false |
139-
| isv_applePayDisplayName | String | false |
140-
| isv_applePaySessionData | String | false |
141-
| isv_payerEnrollTransactionId | String | false |
142-
| isv_payerEnrollStatus | String | false |
143-
| isv_payerEnrollHttpCode | Number | false |
144-
| isv_saleEnabled | Boolean | false |
145-
| isv_enabledMoto | Boolean | false |
146-
| isv_walletType | String | false |
147-
| isv_accountNumber | String | false |
148-
| isv_accountType | String | false |
149-
| isv_routingNumber | String | false |
150-
| isv_merchantId | String | false |
151-
| isv_securityCode | Number | false |
114+
| Name | Type | Required | Notes |
115+
| ------------------------------------ | ------- | -------- | ------ |
116+
| isv_token | String | false | |
117+
| isv_tokenAlias | String | false | |
118+
| isv_savedToken | String | false ||
119+
| isv_tokenVerificationContext | String | false ||
120+
| isv_tokenCaptureContextSignature | String | false ||
121+
| isv_cardType | String | false ||
122+
| isv_maskedPan | String | false ||
123+
| isv_cardExpiryMonth | String | false ||
124+
| isv_cardExpiryYear | String | false ||
125+
| isv_requestJwt | String | false ||
126+
| isv_responseJwt | String | false ||
127+
| isv_payerAuthenticationRequired | Boolean | false ||
128+
| isv_payerAuthenticationTransactionId | String | false ||
129+
| isv_payerAuthenticationAcsUrl | String | false ||
130+
| isv_payerAuthenticationPaReq | String | false ||
131+
| isv_acceptHeader | String | false ||
132+
| isv_userAgentHeader | String | false ||
133+
| isv_deviceFingerprintId | String | false ||
134+
| isv_customerIpAddress | String | false ||
135+
| isv_cardinalReferenceId | String | false ||
136+
| isv_deviceDataCollectionUrl | String | false ||
137+
| isv_stepUpUrl | String | false ||
138+
| isv_applePayValidationUrl | String | false ||
139+
| isv_applePayDisplayName | String | false ||
140+
| isv_applePaySessionData | String | false ||
141+
| isv_payerEnrollTransactionId | String | false ||
142+
| isv_payerEnrollStatus | String | false ||
143+
| isv_payerEnrollHttpCode | Number | false ||
144+
| isv_saleEnabled | Boolean | false ||
145+
| isv_enabledMoto | Boolean | false ||
146+
| isv_walletType | String | false ||
147+
| isv_accountNumber | String | false ||
148+
| isv_accountType | String | false ||
149+
| isv_routingNumber | String | false ||
150+
| isv_merchantId | String | false ||
151+
| isv_securityCode | Number | false ||
152+
| isv_screenWidth | String | false ||
153+
| isv_screenHeight | String | false ||
154+
| isv_responseDateAndTime | String | false ||
155+
| isv_authorizationStatus | String | false |This field will be updated with the initial authorization or sale status from the payment gateway. If Cybersource response doesn't reach the extension, this field will remain empty|
156+
| isv_authorizationReasonCode | Number | false ||
157+
| isv_ECI | String | false ||
158+
| isv_AVSResponse | String | false ||
159+
| isv_CVVResponse | String | false ||
160+
| isv_responseCode | String | false ||
161+
| isv_dmpaFlag | Boolean | false ||
152162

153163
### Payer Authentication enrolment check
154164

docs/Creating-a-Payment.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,5 @@ When creating a payment, the following fields are validated
2727
| payment.custom.isv_routingNumber | Must exist | If payment.paymentMethodInfo.method is eCheck |
2828
| payment.custom.isv_acceptHeader | Must exist | If payment.paymentMethodInfo.method is creditCardWithPayerAuthentication |
2929
| payment.custom.isv_userAgentHeader | Must exist | If payment.paymentMethodInfo.method is creditCardWithPayerAuthentication |
30+
| payment.custom.isv_screenWidth | Must exist | If payment.paymentMethodInfo.method is creditCardWithPayerAuthentication |
31+
| payment.custom.isv_screenHeight | Must exist | If payment.paymentMethodInfo.method is creditCardWithPayerAuthentication |

docs/Decision-Manager.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,23 @@ The Cybersource Extension has environment variable for decision manager as `PAYM
4040

4141
> **_NOTE:_** Value for `PAYMENT_GATEWAY_DECISION_SYNC_MULTI_MID` is case sensitive without any spaces.
4242
43+
### Payer Authentication with Decision Manager
44+
45+
You can use Decision Manager with payer authentication services to allow the risk of an order to determine when you need to invoke payer authentication.
46+
Merchant can choose to set the following rules in Decision Manager profile
47+
48+
1. `PAYERAUTH_INVOKE` profile.
49+
50+
![](./images/Payer_Auth_Invoke.png)
51+
2. `PAYERAUTH_EXTERNAL` profile.
52+
53+
![](./images/Payer_Auth_External.png)
54+
3. `PAYERAUTH_SKIP` profile.
55+
56+
![](./images/Payer_Auth_Skip.png)
57+
58+
To see more about Payer Authentication with decision manager, refer [this](https://ebc.cybersource.com/content/ebc/docs/cybs/en-us/html/dm-develop/developer/all/so/oxy_ex-1/topics/c_Using_DM_With_Payer_Auth.html)
59+
4360
## Optional fields
4461

4562
To pass additional data to Decision Manager, it is possible to customize the Commercetools resources to add extra fields. If these fields exist and there are values present for these, then the extension will pass the values on to Cybersource in the appropriate request

docs/Docker-Container-in-Azure.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Replace value of the following
124124

125125
Once `deploy-aci.yaml` is ready with all the values, navigate to the directory where file is present and run the following command
126126

127-
az container create --resource-group rg-visa-qa --file deploy-aci.yaml
127+
az container create --resource-group <name of resource group> --file deploy-aci.yaml
128128

129129
**_NOTE:_** In `deploy-aci.yaml` file, make sure to mention all the existing variables since modification with yaml file will override all the existing variables.
130130

@@ -146,4 +146,4 @@ Once `deploy-aci.yaml` is ready with all the values, navigate to the directory w
146146

147147
3. While modifying container instance, if you are getting "internal server error", it means value provided in deploy-aci.yaml is incorrect, make sure to provide correct values for all the fields.
148148

149-
4. If you are getting "Gateway Timeout" after hitting container's FQDN, it might be possible that incorrect value is being passed for DNS name label scope reuse field or value for CONFIG_PORT environment variable is not provided. If PAYMENT_GATEWAY_SERVERLESS_DEPLOYMENT environment variable is set to 'azure', then providing value for FUNCTIONS_HTTPWORKER_PORT is must.
149+
4. If you are getting "Gateway Timeout" after hitting container's FQDN, it might be possible that incorrect value is being passed for DNS name label scope reuse field or value for CONFIG_PORT environment variable is not provided. If PAYMENT_GATEWAY_SERVERLESS_DEPLOYMENT environment variable is set to 'azure', then providing value for FUNCTIONS_HTTPWORKER_PORT is must.

docs/Docker.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Before using it, make sure to install Docker Desktop in the respective system.
88
## Building the Docker image
99
Navigate to the root directory of extension and run the following command to build the Docker image
1010

11-
Use appropriate appline of Nodejs and modify the Dockerfile if necessary.
11+
Use appropriate appline of Nodejs and modify the `Dockerfile` if necessary.
1212

1313
**_Note_**: Make sure to remove `node_modules` folder if it exists before building the image and ensure that Docker is running.
1414

@@ -33,4 +33,4 @@ Before using it, make sure to install Docker Desktop in the respective system.
3333

3434
## Running the Docker image in AWS
3535
To run the docker image in AWS, refer the following guide [Docker-Container-in-AWS](Docker-Container-in-AWS.md)
36-
- To run the docker image in Azure, [Docker-Container-in-Azure](Docker-Container-in-Azure.md)
36+
- To run the docker image in Azure, [Docker-Container-in-Azure](Docker-Container-in-Azure.md)

docs/Process-a-Card-Payment-With-Payer-Authentication.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ After authentication is complete, authorization of the payment can then be tri
3030
| region | shipTo_state | billTo_state | |
3131
| country | shipTo_country | billTo_country | |
3232
| email | shipTo_email | billTo_email | |
33+
| phone | shipTo_phone | billTo_phone | |
3334

3435
2. Tokenize Card details using Cybersource Flex
3536

@@ -75,7 +76,7 @@ After authentication is complete, authorization of the payment can then be tri
7576

7677
a. Also see [Decision Manager](Decision-Manager.md) for additional fields to populate if you are using Decision Manager
7778

78-
b. When the payment is being updated, the extension will do a Payer Setup call to get reference_id for Digital Wallets to use in place of BIN number in Cardinal.
79+
b. When the payment is being updated, the extension will do a Payer Auth Setup call to get reference_id for Digital Wallets to use in place of BIN number in Cardinal.
7980

8081
Skip this step for saved token and proceed to step c
8182

@@ -91,7 +92,7 @@ After authentication is complete, authorization of the payment can then be tri
9192
| custom.fields.isv_saleEnabled | false | Yes | Set the value to true if sale is enabled |
9293

9394

94-
c. For saved token, when the payment is being updated, the extension will do a Payer Setup call to get reference_id for Digital Wallets to use in place of BIN number in Cardinal.
95+
c. For saved token, when the payment is being updated, the extension will do a Payer Auth Setup call to get reference_id for Digital Wallets to use in place of BIN number in Cardinal.
9596

9697
| Property | Value | Required | Notes |
9798
| ------------------------------------- | ------------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -115,6 +116,9 @@ After authentication is complete, authorization of the payment can then be tri
115116
| custom.fields.isv_acceptHeader | Accept header from Customer browser | Yes | Used by 3DS process, populated from client-side libraries |
116117
| custom.fields.isv_userAgentHeader | User agent header from Customer browser | Yes | Used by 3DS process, populated from client-side libraries |
117118
| custom.fields.isv_customerIpAddress | Customer IP address | Yes | Populated from client-side libraries |
119+
| custom.fields.isv_screenWidth | Screen width of Customer browser | Yes | Used by 3DS process, populated from client-side libraries |
120+
| custom.fields.isv_screenHeight | Screen height of Customer browser | Yes | Used by 3DS process, populated from client-side libraries |
121+
118122

119123
8. wait for the response from ddc form and if successful, then proceed with enrolment, verify the following fields from update response
120124

@@ -124,7 +128,7 @@ After authentication is complete, authorization of the payment can then be tri
124128
isv_payerEnrollHttpCode
125129
isv_payerEnrollStatus
126130

127-
9. Check if the `isv_payerEnrollHttpCode` value is 201 and `isv_payerEnrollStatus` value "CUSTOMER_AUTHENTICATION_REQUIRED" from the updated response. If yes, repeat the steps from 6 else proceed to step 10
131+
9. Check if the `isv_payerEnrollHttpCode` value is 201 and `isv_payerEnrollStatus` value "CUSTOMER_AUTHENTICATION_REQUIRED" from the updated response. If yes, repeat the steps from 5 else proceed to step 10. Refer the [DMPA](./Decision-Manager.md#payer-authentication-with-decision-manager) section to know more about the DMPA
128132

129133
10. Check the value of the isv_payerAuthenticationRequired field on the
130134
updated payment. If the value is true, perform the following steps
@@ -146,7 +150,7 @@ After authentication is complete, authorization of the payment can then be tri
146150
isv_payerEnrollHttpCode
147151
isv_payerEnrollStatus
148152

149-
Check if the isv_payerEnrollHttpCode value is 201 and isv_payerEnrollStatus value "CUSTOMER_AUTHENTICATION_REQUIRED" from the updated response. If yes, repeat the steps from 6 else proceed to step 12.
153+
Check if the isv_payerEnrollHttpCode value is 201 and isv_payerEnrollStatus value "CUSTOMER_AUTHENTICATION_REQUIRED" from the updated response. If yes, repeat the steps from 5 else proceed to step 12.
150154

151155
12. Add a transaction to the payment
152156

20 KB
Loading

0 commit comments

Comments
 (0)