You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,3 +34,7 @@ The plugin is a publicly exposed service that acts as a middleware between the C
34
34
35
35
- Follow [Setup Guide](./docs/Setup.md) for getting started with the integration of Commercetools with the plugin.
36
36
- Follow [Usage Guide](./docs/Usage.md) to see more information about the payment services.
37
+
38
+
## Network Capability
39
+
40
+
By accepting this document, you acknowledge and accept that you are responsible for and assume liability for the functionality, maintenance and availability of your software and network. At all times, it is your responsibility to ensure the accuracy, technical sufficiency and functionality of your software, network, plug-ins, configurations, applications, code, application program interfaces (APIs), software development kits and all other technology (“Your Network”). You are responsible for Your Network’s ability to use and/or access the Cybersource network, any Cybersource API and receive the benefit of Cybersource’s services. You are responsible for all costs, fees, expenses and liabilities associated with Your Network’s ability to access and interface with the Cybersource network and receive the benefit of Cybersource’s services. Cybersource will not be responsible or liable for loss or costs associated with or that results from Your Network’s inability to connect to or process transactions on the Cybersource network.
Copy file name to clipboardExpand all lines: docs/API-Extension-Setup.md
+48-4Lines changed: 48 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,12 +21,15 @@ Variables that begin with 'CT' prefix are Commercetools project specific propert
21
21
| PAYMENT_GATEWAY_EXTENSION_DESTINATION_URL | URL where your plugin is hosted | Recommended https. Required to create custom types to process payments |
22
22
| PAYMENT_GATEWAY_EXTENSION_HEADER_VALUE | Your Commercetools username:password base64 encoded value | Required to extend payment and customer API to process payments |
23
23
| PAYMENT_GATEWAY_MERCHANT_ID | Your Cybersource merchant Id | Provided by Cybersource |
24
-
| PAYMENT_GATEWAY_MERCHANT_KEY_ID | Id of a Cybersource shared secret key to be used for HTTP Signature authentication | Created in <ahref="Key-Creation.md">Key Creation</a> |
25
-
| PAYMENT_GATEWAY_MERCHANT_SECRET_KEY | Value of a Cybersource shared secret key to be used for HTTP Signature authentication | Created in <ahref="Key-Creation.md">Key Creation</a> |
24
+
| PAYMENT_GATEWAY_MERCHANT_KEY_ID | Id of a Cybersource shared secret key to be used for HTTP Signature authentication | Created in <ahref="Key-Creation.md">Key Creation</a>. This would be considered as the default mid credentials of the plugin. |
25
+
| PAYMENT_GATEWAY_MERCHANT_KEY_ID | Id of a Cybersource shared secret key to be used for HTTP Signature authentication | Created in <ahref="Key-Creation.md">Key Creation</a>. This would be considered as the default mid credentials of the plugin. |
26
+
| PAYMENT_GATEWAY_MERCHANT_SECRET_KEY | Value of a Cybersource shared secret key to be used for HTTP Signature authentication | Created in <ahref="Key-Creation.md">Key Creation</a>. |
27
+
| XXXX_KEY_ID | Id of a Cybersource shared secret key to be used for HTTP Signature authentication | Created in <ahref="Key-Creation.md">Key Creation</a> . Required only when you need to support Multi-Mid. XXXX should be your Cybersource merchant Id in block letters |
28
+
| XXXX_SECRET_KEY | Value of a Cybersource shared secret key to be used for HTTP Signature authentication | Created in <ahref="Key-Creation.md">Key Creation</a> . Required only when you need to support Multi-Mid. XXXX should be your Cybersource merchant Id in block letters |
26
29
| PAYMENT_GATEWAY_RUN_ENVIRONMENT | TEST or PRODUCTION | Property for running the project in TEST or PRODUCTION environment |
27
30
| PAYMENT_GATEWAY_DECISION_MANAGER | Boolean value - true or false | Flag for enabling or disabling Decision Manager for Authorization. Case sensitive |
28
31
| PAYMENT_GATEWAY_SCA_CHALLENGE | Boolean value - true or false | Flag to force Strong consumer authentication challenge while saving a card using Payer Authentication. Case sensitive |
29
-
| PAYMENT_GATEWAY_ORDER_RECONCILIATION | Boolean value - true or false | Flag for enabling or disabling Order reconciliation to indicate whether reconciliation Id to be passed in authorization, capture and refund transactions. Case sensitive
32
+
| PAYMENT_GATEWAY_ORDER_RECONCILIATION | Boolean value - true or false | Flag for enabling or disabling Order reconciliation to indicate whether reconciliation Id to be passed in authorization, capture and refund transactions. Case sensitive. **_NOTE:_** The Cybersource-Commercetools Plugin will consider order number as the reconciliation id if available. The order number from Commercetools should be numeric/alpha-numeric string to reflect in Cybersource
30
33
| PAYMENT_GATEWAY_TARGET_ORIGIN | Base URL where your frontend will be accessible ||
31
34
| PAYMENT_GATEWAY_VERIFICATION_KEY | Used to check Flex tokens for tampering | Use <b>Openssl -rand64 32</b> to generate verification key |
32
35
| PAYMENT_GATEWAY_3DS_RETURN_URL | URL that the issuing bank will redirect to the customer for payer Authentication | Used only if payment.paymentMethodInfo.method == creditCardWithPayerAuthentication |
@@ -39,6 +42,7 @@ Variables that begin with 'CT' prefix are Commercetools project specific propert
39
42
| PAYMENT_GATEWAY_SAVED_CARD_LIMIT_FRAME | Numeric value between 1-24 | Provide the number of hours that saved card attempts are counted (Max of 24 hours). By default this value is set to 1, applicable only if rate limiter is enabled |
40
43
| PAYMENT_GATEWAY_DECISION_SYNC | Boolean value - true or false | Flag for enabling or disabling Decision sync. Case sensitive |
41
44
| PAYMENT_GATEWAY_RUN_SYNC | Boolean value - true or false | Flag for enabling or disabling Run sync. Case sensitive |
45
+
| PAYMENT_GATEWAY_DECISION_SYNC_MULTI_MID | Comma separated value of merchant Ids | Merchant Ids in which decision sync should be enabled. Provide the exact merchant id as it is.(Make sure there is no extra spaces in between) |
42
46
| AWS_ACCESS_KEY_ID | AWS Access Key ID | Provided by AWS in [AWS-Serverless-Deployment\#AWSSecurityCredentials](AWS-Serverless-Deployment.md#AWSSecurityCredentials). Required when running Docker container in AWS |
43
47
| AWS_SECRET_ACCESS_KEY | AWS Secret Key | Provided by AWS in [AWS-Serverless-Deployment\#AWSSecurityCredentials](AWS-Serverless-Deployment.md#AWSSecurityCredentials). Required when running Docker container in AWS |
44
48
| AWS_REGION | AWS Region Name | Provided by AWS. Required when running Docker container in AWS |
@@ -50,6 +54,40 @@ Variables that begin with 'CT' prefix are Commercetools project specific propert
50
54
| CT_AUTH_HOST | Commercetools auth server URL | Created in <ahref="Key-Creation.md">Key Creation</a> |
51
55
| CT_API_HOST | Commercetools API server URL | Created in <ahref="Key-Creation.md">Key Creation</a> |
52
56
57
+
## Support for Multi-Mid
58
+
59
+
In this section mid refers to Cybersource Merchant Id.
60
+
61
+
The new mid configurations should be added in the .env file of the plugin in the following format
62
+
63
+
XXXX_KEY_ID = <Id of a Cybersource shared secret key>
64
+
XXXX_SECRET_KEY = <Value of a Cybersource shared secret key>
65
+
66
+
Likewise you can configure, as many mids you want to support.
67
+
68
+
The mid added for `PAYMENT_GATEWAY_MERCHANT_ID` should be the default mid in which transactions will be processed when Multi-Mid is not enabled.
69
+
70
+
Following are the constraints to be followed when you want to support multiple mids in your plugin instance.
71
+
72
+
1. It is mandatory to provide the env variables for multi-mid in recommended format only.
73
+
2. All env variables should be in block letters
74
+
3. First part of the variable (XXXX) should be your Cybersource merchant Id in block letters
75
+
4. Second part of the variable to store key Id should be _KEY_ID
76
+
5. Second part of the variable to store secret key should be _SECRET_KEY
77
+
78
+
Example :
79
+
80
+
Below is the env variables for the mid which has merchant Id as `merchantid123`
81
+
82
+
83
+
MERCHANTID123_KEY_ID = <Id of a Cybersource shared secret key>
84
+
MERCHANTID123_SECRET_KEY = <Value of a Cybersource shared secret key>
85
+
86
+
Below is an example to set the value for PAYMENT_GATEWAY_DECISION_SYNC_MULTI_MID variable.
For tokenization service i.e adding a card, updating a card and deleting a card in my account section, plugin will always consider default mid.
53
91
# Deployment
54
92
55
93
The Commercetools - Cybersource plugin is a typescript project which is built using cybersource-rest-client npm package and other several node packages.
@@ -71,13 +109,19 @@ The steps involved in deploying the Commercetools - Cybersource plugin in develo
71
109
72
110
> **_NOTE:_** This is not necessary if the dependencies are already availabe in <b>node_modules</b> repository
73
111
112
+
- Run the following script to create the Commercetools extensions and custom fields
113
+
114
+
npm run setup-resources
115
+
116
+
> **_NOTE:_** This can also be done by using `{baseUrl}/configurePlugin` endpoint once the server is started
117
+
74
118
- Run the following script to build the changes & running the plugin
75
119
76
120
npm run start
77
121
78
122
> **_NOTE:_** It is necessary to build the entire plugin. Whenever there is a change and that need to be reflected, run the following script for building the application
Copy file name to clipboardExpand all lines: docs/Capture-a-Payment.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
7
7
## Process
8
8
9
-
To capture a payment, an Authorization must have been completed. When the Payment Update API plugin receives a payment that contains an INITIAL CHARGE transaction, it will attempt to capture the requested amount on the transaction using the `interactionId` of the existing SUCCESS AUTHORIZATION transaction on the payment.
9
+
To capture a payment, an Authorization must have been completed. When the Payment Update API plugin receives a payment that contains an INITIAL CHARGE transaction, it will attempt to capture the requested amount on the transaction using the `interactionId` of the existing SUCCESS AUTHORIZATION transaction on the payment.You can perform multiple captures but the total of all previous successful captures and the current capture must be not more than the amount authorized.
| {baseUrl}/configurePlugin | The baseUrl will be defined by where you deploy the plugin. HTTPS should be used for production. See [API Extension Setup](API-Extension-Setup.md) to know the values to be passed for the fields required before running the script |
230
232
231
-
Alternatively, navigate to the `{baseUrl}/orders` endpoint and click on **Run Script** button in the UI page. This will invoke the `{baseUrl}/configurePlugin` endpoint to handle the same. Ensure to create the extensions using the plugin endpoint provided in order to avoid authentication overheads later.
233
+
You can navigate to the `{baseUrl}/orders` endpoint and click on **Run Script** button in the UI page. This will invoke the `{baseUrl}/configurePlugin` endpoint to handle the same. Ensure to create the extensions using the plugin endpoint provided in order to avoid authentication overheads later.
234
+
235
+
Alternatively, you can create extensions and custom fields also by executing the following script command.
236
+
237
+
npm run setup-resources
238
+
239
+
Following env variables are mandatory for the script to execute successfully:
240
+
241
+
- PAYMENT_GATEWAY_EXTENSION_DESTINATION_URL
242
+
- PAYMENT_GATEWAY_EXTENSION_HEADER_VALUE
243
+
- CT_PROJECT_KEY
244
+
- CT_CLIENT_ID
245
+
- CT_CLIENT_SECRET
246
+
- CT_AUTH_HOST
247
+
- CT_API_HOST
248
+
249
+
Refer [API Estension Setup](./API-Extension-Setup.md) to know more about the value to be populated to each of the variable.
250
+
251
+
<b>Ensure to create the extensions using any one of the above approaches only in order to avoid authentication overheads later.</b>
252
+
253
+
> **_NOTE:_** For all kind of deployments including local, AWS and for Docker image, the extension creation and customization using the npm command `npm run setup-resources` will be possible only if the system supports `npm`
232
254
233
255
> **_NOTE:_** Authentication is required for accessing any endpoint in the plugin, hence ensure to provide the valid values for the same. Refer [Authentication](./Authentication.md) for more information.
234
256
235
-
> **_NOTE:_**An example of custom field creation and setting data to the created custom field can be found in [Example-Custom-Field](./Example-Custom-Field.md)
257
+
An example of custom field creation and setting data to the created custom field can be found in [Example-Custom-Field](./Example-Custom-Field.md)
Copy file name to clipboardExpand all lines: docs/Decision-Manager.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ Replace the below data:
36
36
37
37
### Enabling/disabling decision manager for specific payments
38
38
39
-
The Cybersource Plugin has environment variable for decision manager as PAYMENT_GATEWAY_DECISION_MANAGER, you can set the values to true or false to enable or disable decision manager
39
+
The Cybersource Plugin has environment variable for decision manager as PAYMENT_GATEWAY_DECISION_MANAGER, you can set the values to true or false to enable or disable decision manager. If set to true, PAYMENT_GATEWAY_DECISION_SYNC_MULTI_MID variable must be configured with comma separated values of different merchant Ids in which decision manager has to be executed.
0 commit comments