Skip to content

Commit ff25f37

Browse files
Merge pull request #23 from cybersource-tpi/develop
Release v23.3.0
2 parents 14ff914 + 7ce22ce commit ff25f37

File tree

75 files changed

+15617
-14391
lines changed

Some content is hidden

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

75 files changed

+15617
-14391
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Please refer to the [official documentation](documentation/occ.md) to get all de
99
## Prerequisites
1010

1111
- Yarn version: [1.22.4](https://classic.yarnpkg.com/en/docs/install/#mac-stable)
12-
- NodeJS version: 16.15.0, You could use [NVM](https://github.com/nvm-sh/nvm) to manage multiple versions locally
12+
- NodeJS version: 18.16.1, You could use [NVM](https://github.com/nvm-sh/nvm) to manage multiple versions locally
1313

1414

1515
## Install dependencies
Binary file not shown.
Binary file not shown.
-27 KB
Binary file not shown.
1.19 MB
Loading
File renamed without changes.
-85.6 KB
Binary file not shown.
Binary file not shown.

documentation/installation.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ Please pay attention to installation steps documented for both SSE and widgets (
2727

2828
The following is required before going through installation steps:
2929

30-
1. Yarn version: [1.22.18](https://classic.yarnpkg.com/en/docs/install/#mac-stable)
31-
2. NodeJS version: 16.15.0, You could use [NVM](https://github.com/nvm-sh/nvm) to manage multiple versions locally
30+
1. Yarn version: [1.22.4](https://classic.yarnpkg.com/en/docs/install/#mac-stable)
31+
2. NodeJS version: 18.16.1, You could use [NVM](https://github.com/nvm-sh/nvm) to manage multiple versions locally
3232
3. OCC environment
3333
- OCC Admin interface: https://asbx80c1dev-admin-{env}.oraclecloud.com/occs-admin/
3434
- OCC Storefront: https://asbx80c1dev-store-{env}.oraclecloud.com
@@ -91,8 +91,8 @@ After successful deployment you will need to enable payment gateway:
9191
- Configure gateway settings by providing values (e.g. merchant credentials) for particular channel (Preview, Storefront, Agent)
9292
- Save Changes
9393
- Go back to the 'Payment Types' type
94-
- Select supported credit card types from the list
95-
- You might want to also provide list of supported billing countries as well as default one
94+
- Select supported credit card types from the list [Possible card types: VISA, MASTERCARD, AMEX, DISCOVER, DINERSCLUB, JCB, CARTESBANCAIRES, MAESTRO, CARNET, CUP]
95+
- You might want to also provide list of supported billing countries as well as default one
9696
- Save Changes
9797

9898
## Configure Generic Webhooks
@@ -198,16 +198,16 @@ yarn occ deploy
198198
### Add widget to the Checkout layout
199199

200200
1. Go to the OCC admin design tab and replace the default checkout-continue-to-review-order-button component with the IsvCheckoutContinueToReviewOrderButton on the checkout-payment page
201-
![isf review order path](images/isv-review-order-path.png)
202-
Drag ![isf review order button](images/isv-review-order-button.png) from the Components tray into the layout container.
201+
![isv review order path](images/isv-review-order-path.png)
202+
Drag ![isv review order button](images/isv-review-order-button.png) from the Components tray into the layout container.
203203

204204
2. Go to the OCC admin design tab and replace the default checkout-place-order-button component with the IsvCheckoutPlaceOrderButton on the checkout-review-order page
205-
![isf place order path](images/isv-place-order-path.png)
206-
Drag ![isf place order button](images/isv-place-order-button.png) from the Components tray into the layout container.
205+
![isv place order path](images/isv-place-order-path.png)
206+
Drag ![isv place order button](images/isv-place-order-button.png) from the Components tray into the layout container.
207207

208208
3. Layout the IsvPaymentMethod component on the checkout payments container
209-
![isf payment method path](images/isv-payment-method-path.png)
210-
Remove the checkout-credit-card component from the layout and replace it with ![isf payment method](images/isv-payment-method.png).
209+
![isv payment method path](images/isv-payment-method-path.png)
210+
Remove the checkout-credit-card component from the layout and replace it with ![isv payment method](images/isv-payment-method.png).
211211

212212
4. Publish all changes
213213

documentation/introduction.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ The custom payment plugin solution provides an integration layer between OCC and
1414
- Void (Authorization Reversal)
1515
- Capture
1616
- Refund
17-
- Tokenized card payment based on FlexMicroform v0.11
17+
- Tokenized card payment based on FlexMicroform v2
1818
- Payer authentication support (3D Secure)
19+
- Network tokenization
1920
- Store tokenized credit card against user profile
2021
- Payments using stored credit cards
2122
2. Online Authorizations

documentation/occ.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ This document is written for merchants who want to use Payment and Value added B
6464

6565
- Supplemental Technical Resource Guide for OCC ( [HTML](https://community.oracle.com/docs/DOC-1038707) )
6666
- Generic Payment Gateway Integration ( [HTML](https://docs.oracle.com/en/cloud/saas/cx-commerce/20c/ccdev/create-generic-payment-gateway-integration1.html) )
67-
- SSE Development Best Practices ( [HTML](https://community.oracle.com/customerconnect/discussion/630679/server-side-extension-development-best-practices) )
68-
- Developing OSF in OCC ( [HTML](https://docs.oracle.com/en/cloud/saas/cx-commerce/dosfa/index.html ) )
67+
- Payment Integration with OCC ( [HTML](https://community.oracle.com/docs/DOC-1032741) )
68+
- OCC Payment FAQ ( [HTML](https://community.oracle.com/docs/DOC-1032746) )
69+
- SSE Development Best Practices ( [HTML](https://community.oracle.com/groups/oracle-commerce-cloud-group/blog/2018/11/08/server-side-extension-development-best-practices) )
70+
- Developing Widgets in OCC ( [HTML](https://docs.oracle.com/en/cloud/saas/cx-commerce/20c/widge/create-widget1.html) )
6971
- Cybersource REST API Reference ( [HTML](https://developer.cybersource.com/api-reference-assets/index.html) )

documentation/package-contents.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The CLI tool is a combined version of utilities shared in the following communit
2121
By running `yarn occ` you will get the list of supported commands
2222

2323
```bash
24-
yarn run v1.22.18
24+
yarn run v1.22.4
2525
$ node ./bin/index.js
2626
Usage: index [options] [command]
2727

@@ -107,6 +107,7 @@ The following settings can be configured in gateway:
107107
| **Credit Card** | |
108108
| **payerAuthEnabled** | Enables payer authentication for credit cards |
109109
| **scaEnabled** | If enabled card holder will be 3DS Challenged when saving a card |
110+
| **networkTokenUpdates** | Subscribe to Network Token Life cycle updates |
110111
| **flexSdkUrl** | Credit Card Flex SDK URL |
111112
| **isCVVRequiredForSavedCards** | Is the CVV required when using a saved card. |
112113
| **isCVVRequiredForScheduledOrders** | Is the CVV required for a Scheduled Order |
@@ -199,7 +200,8 @@ server-extension
199200
┃ ┃ ┣ paymentMethods.ts
200201
┃ ┃ ┣ paymentRefund.ts
201202
┃ ┃ ┣ paymentRouter.js
202-
┃ ┃ ┗ report.ts
203+
┃ ┃ ┣ report.ts
204+
┃ ┃ ┗ webhookRouter.ts
203205
┃ ┣ errors
204206
┃ ┃ ┣ handlers
205207
┃ ┃ ┃ ┣ api400ResponseHandler.ts
@@ -294,7 +296,8 @@ server-extension
294296
┃ ┃ ┃ ┃ ┃ ┣ captureEndpoint.ts
295297
┃ ┃ ┃ ┃ ┃ ┣ common.ts
296298
┃ ┃ ┃ ┃ ┃ ┣ index.ts
297-
┃ ┃ ┃ ┃ ┃ ┗ refundEndpoint.ts
299+
┃ ┃ ┃ ┃ ┃ ┣ refundEndpoint.ts
300+
┃ ┃ ┃ ┃ ┃ ┗ subscribeApi.js
298301
┃ ┃ ┃ ┃ ┗ common.ts
299302
┃ ┃ ┃ ┣ paymentMethod
300303
┃ ┃ ┃ ┃ ┣ configBuilder.ts
@@ -318,7 +321,8 @@ server-extension
318321
┃ ┃ ┣ cacheService.ts
319322
┃ ┃ ┣ cryptoService.ts
320323
┃ ┃ ┣ jwtService.ts
321-
┃ ┃ ┗ loggingService.ts
324+
┃ ┃ ┣ loggingService.ts
325+
┃ ┃ ┗ publicKeyApi.js
322326
┃ ┣ types
323327
┃ ┃ ┗ occ-sdk.d.ts
324328
┃ ┣ app.ts
@@ -405,7 +409,7 @@ The table below lists available middleware components
405409

406410
Additional configuration properties managed by 'nconf' library available in OCC environment are located at `packages/server-extension/config`. Please notice there are version for local and production (deployed) environments
407411

408-
SSE communicates with PSP using client [NodeJS SDK v0.0.20](https://github.com/CyberSource/cybersource-rest-client-node). Typescript friendly SDK wrapper is located in the `packages/payment-sdk`. It declares TS type definition's for the PSP API. You can manage generated type definitions by tweaking `packages/payment-sdk/generator/cybersource-ts-template/api.mustache` template. In order to generate new types from the updated template run the following:
412+
SSE communicates with PSP using client [NodeJS SDK v0.0.43](https://github.com/CyberSource/cybersource-rest-client-node). Typescript friendly SDK wrapper is located in the `packages/payment-sdk`. It declares TS type definition's for the PSP API. You can manage generated type definitions by tweaking `packages/payment-sdk/generator/cybersource-ts-template/api.mustache` template. In order to generate new types from the updated template run the following:
409413

410414
```bash
411415
cd packages/payment-sdk

documentation/payment-services/credit-card.md

+26-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
1. [UI integration details](#ui-integration-details-1)
1111
2. [Backend (SSE) integration details](#backend-sse-integration-details-1)
1212
3. [Strong Customer Authentication (SCA)](#strong-customer-authentication-sca)
13-
4. [Capturing funds during authorization (SALE)](#capturing-funds-during-authorization-sale)
13+
4. [Network Tokenization](#network-tokenization)
14+
5. [Capturing funds during authorization (SALE)](#capturing-funds-during-authorization-sale)
1415

1516
## Description
1617

@@ -26,9 +27,10 @@ The Credit Card payment service provides the following operations:
2627

2728
The following applies to credit card payments:
2829

29-
- Credit card payments using [FlexMicroform v0.11](https://developer.cybersource.com/api/developer-guides/dita-flex/SAFlexibleToken/FlexMicroform.html). The transient token represents both card number (PAN) and CVV. Only token, card expiration date and masked card number going to be sent in a webhook request.
30+
- Credit card payments using [FlexMicroform v2](https://developer.cybersource.com/api/developer-guides/dita-flex/SAFlexibleToken/FlexMicroform.html). The transient token represents both card number (PAN) and CVV. Only token, card expiration date and masked card number going to be sent in a webhook request.
3031
- Payer Authentication (3D Secure)
3132
- Shopper can choose to save credit card as part of profile
33+
- Subscribe to Network Token life cycle updates
3234
- Shopper can pay with a saved card
3335

3436
![Note](../images/note.jpg) With Flex Microform, the capture of card number and security code (CVV) are fully outsourced to the payment provider, which can qualify merchants for SAQ A-based assessments. Flex Microform provides the most secure method for tokenizing card data. Sensitive data is encrypted on the customer's device before HTTPS transmission to the payment provider. This method mitigates any compromise of the HTTPS connection through a man in the middle attack.
@@ -45,6 +47,7 @@ The following gateway settings apply to credit card payments
4547
| **paymentOptions** | Payment options enabled for payment using Payment Widget. 'Credit & Debit Card' should be enabled |
4648
| **payerAuthEnabled** | Enables payer authentication (3D Secure) for credit cards |
4749
| **scaEnabled** | If enabled card holder will be 3DS Challenged when saving a card |
50+
| **networkTokenUpdates** | Subscribe to Network Token Life cycle updates |
4851
| **saleEnabled** | Indicates if authorizing and taking payment will be done at the same time |
4952
| **isCVVRequiredForSavedCards** | Should be disabled as CVV is not required in backend |
5053
| **isCVVRequiredForScheduledOrders** | Should be disabled as CVV is not required in backend |
@@ -53,6 +56,7 @@ Default values:
5356

5457
- `payerAuthEnabled`: true. Payer authentication is enabled by default
5558
- `scaEnabled` : false
59+
- `networkTokenUpdates` : false
5660
- `isCVVRequiredForSavedCards`: false
5761
- `isCVVRequiredForScheduledOrders`: false
5862
- `saleEnabled` - by default SALE is disabled for Card payments. Can be enabled in OCC Admin
@@ -99,7 +103,7 @@ Understand OSF applications [CX-Commerce](https://docs.oracle.com/en/cloud/saas/
99103

100104
REST API for Oracle Commerce Cloud 22D [Oracle Commerce Cloud](https://docs.oracle.com/en/cloud/saas/cx-commerce/22d/cxocc/op-ccadmin-v1-merchant-paymenttypes-get.html)
101105

102-
Microform Integration 0.11 Documentation [Microform 0.11](https://developer.cybersource.com/api/developer-guides/dita-flex/da-microform-integ/microform-integ.html)
106+
Microform Integration v2 Documentation [Microform v2](https://developer.cybersource.com/docs/cybs/en-us/digital-accept-flex/developer/all/rest/digital-accept-flex/microform-integ-v2.html)
103107

104108
The structure that follows contain all the components necessary to run Credit Card Payment in OSF.
105109

@@ -279,6 +283,25 @@ In case 'Strong Customer Authentication' is enabled for credit cards, '10000' re
279283

280284
*Note:* The `scaEnabled` setting is applicable only if `Payer Authentication` is enabled.
281285

286+
### Network Tokenization
287+
288+
A Network Token is a network scheme generated token, that represents customer card information for secure transactions that references a customer’s actual PAN.
289+
290+
Before a MID can be enabled for Network Tokenization, it must be provisioned with a Token Requestor ID (TRID) for each card scheme.
291+
292+
Plug-in would need to subscribe to the necessary webhook notifications and ingest them for changes to the card. Subscription is created automatically when Authorization is processed, while the Webhook Subscription feature is enabled.
293+
294+
The following describes the Network Token update process:
295+
296+
1. Once the authorization is successful, check for the field PAR number in the response, if exists make a key generation request.
297+
2. Create a Webhook subscription call and save the details from the response.
298+
3. When the plugin receives a webhook notification for an update,validate the request and then fetch the payment instrument and instrument identifier from the notification payload.
299+
4. The "Retrieve Instrument Identifier" service will be called to fetch card details using the payment instrument and instrument identifier obtained above.
300+
5. The expiry month, expiry year, and card suffix will be updated with the latest details.
301+
6. The updated card details will be saved in OCC.
302+
303+
![Network Tokenization](images/network-token.png)
304+
282305
### Capturing funds during authorization (SALE)
283306

284307
In case merchants would like funds to be captured (settled) during card authorizations `saleEnabled` gateway setting can be updated to enable it for credit cards.
Loading

documentation/support.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ If you require support with this software, please contact GlobalPartnerSolutions
88
- Plugin/ Extension version: Under Settings->Extension, find the version of the installed ISV Payment Gateway extension.
99
![Extension Version](images/extension-version.png)
1010
- Cybersource Merchant ID: Under Settings->Payment Processing, Select the ISV OCC Payment from the Service Type dropdown, find the Merchant Id
11-
![Merchant Id](images/merchant-id.png)
11+
![Merchant Id](images/merchantId.png)
1212
- Order ID/ Merchant Reference Number: Order ID can be found in Order Confirmation Page or under Order History.
1313
- Configuration screenshots: Please provide screenshots of ISV OCC Gateway Configurations.
1414
- Log file and other relevant data: Download the **debug** and **error** logs from Oracle Commerce Cloud using getExtensionServerLogs admin endpoint.

lerna.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"npmClient": "yarn",
3-
"useWorkspaces": true,
4-
"version": "23.2.0",
3+
"version": "23.3.0",
54
"packages": ["packages/*"]
65
}

package.json

+23-23
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "isv-occ-payment",
3-
"version": "23.2.0",
3+
"version": "23.3.0",
44
"description": "ISV Oracle Commerce Cloud Payment Plugin",
55
"main": "index.js",
66
"repository": "[email protected]:cybersource-tpi/cybersource-plugins-oraclecxcommerce.git",
@@ -63,59 +63,59 @@
6363
"test:unit": "lerna run test:unit --stream",
6464
"tsc": "tsc -p ./tsconfig.json",
6565
"upload-custom-typeahead-keywords": "occ upload-custom-typeahead-keywords",
66-
"upload-search-config": "occ upload-search-config"
66+
"upload-search-config": "occ upload-search-config",
67+
"start-sse": "yarn workspace @isv-occ-payment/server-extension start:watch --inspect"
6768
},
6869
"dependencies": {
6970
"@popperjs/core": "^2.11.6",
70-
"jwt-decode": "^3.1.2",
71+
"jwt-decode": "^4.0.0",
7172
"tsc-alias": "^1.7.1"
72-
7373
},
7474
"devDependencies": {
75-
"@ts-tools/node": "^4.0.0",
75+
"@ts-tools/node": "^5.0.2",
7676
"@types/compression": "^1.7.2",
7777
"@types/crypto-js": "^4.1.1",
78-
"@types/googlepay": "^0.6.4",
78+
"@types/googlepay": "^0.7.3",
7979
"@types/jest": "^29.2.3",
8080
"@types/jwt-decode": "^3.1.0",
81-
"@types/node": "18.11.9",
81+
"@types/node": "^20.8.9",
8282
"@types/node-fetch": "^2.6.2",
8383
"@types/supertest": "^2.0.12",
84-
"@typescript-eslint/eslint-plugin": "^5.43.0",
85-
"@typescript-eslint/parser": "^5.43.0",
84+
"@typescript-eslint/eslint-plugin": "^6.9.1",
85+
"@typescript-eslint/parser": "^6.9.1",
8686
"JSONStream": "^1.3.5",
87-
"archiver": "^5.3.1",
88-
"commander": "^9.4.1",
87+
"archiver": "^6.0.1",
88+
"commander": "^11.1.0",
8989
"eslint": "^8.27.0",
90-
"eslint-config-prettier": "^8.5.0",
90+
"eslint-config-prettier": "^9.0.0",
9191
"eslint-plugin-import": "^2.26.0",
9292
"eslint-plugin-jest": "^27.1.5",
9393
"eslint-plugin-json": "^3.1.0",
9494
"eslint-plugin-jsx-a11y": "^6.6.1",
9595
"eslint-plugin-markdown": "^3.0.0",
9696
"eslint-plugin-no-only-tests": "^3.1.0",
97-
"eslint-plugin-prettier": "^4.2.1",
98-
"eslint-plugin-react": "7.31.10",
97+
"eslint-plugin-prettier": "^5.0.1",
98+
"eslint-plugin-react": "7.33.2",
9999
"eslint-plugin-react-hooks": "^4.6.0",
100-
"eslint-plugin-spellcheck": "0.0.19",
101-
"eslint-plugin-unicorn": "44.0.2",
102-
"fs-extra": "^10.1.0",
100+
"eslint-plugin-spellcheck": "0.0.20",
101+
"eslint-plugin-unicorn": "49.0.0",
102+
"fs-extra": "^11.1.1",
103103
"husky": "^8.0.2",
104104
"jest": "^29.3.1",
105105
"jest-html-reporters": "^3.0.11",
106106
"jest-mock-extended": "^3.0.1",
107107
"jszip": "^3.10.1",
108-
"lerna": "^6.0.3",
109-
"lint-staged": "^13.0.3",
110-
"mkdirp": "^1.0.4",
108+
"lerna": "^7.4.2",
109+
"lint-staged": "^15.0.2",
110+
"mkdirp": "^3.0.1",
111111
"npm-run-all": "^4.1.5",
112-
"prettier": "^2.7.1",
113-
"rimraf": "^3.0.2",
112+
"prettier": "^3.0.3",
113+
"rimraf": "^5.0.5",
114114
"supertest": "^6.3.1",
115115
"symlink-dir": "^5.0.1",
116116
"ts-jest": "^29.0.3",
117117
"tsconfig-paths": "^4.1.0",
118-
"typescript": "~4.9.3",
118+
"typescript": "~5.2.2",
119119
"yauzl": "^2.10.0"
120120
},
121121
"husky": {

0 commit comments

Comments
 (0)