Skip to content

Commit 200917a

Browse files
Merge pull request #6 from cybersource-tpi/main
Releasing v23.2.0
2 parents 49d5825 + 14ff914 commit 200917a

File tree

65 files changed

+1115
-763
lines changed

Some content is hidden

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

65 files changed

+1115
-763
lines changed
Binary file not shown.
Binary file not shown.
-129 KB
Loading
File renamed without changes.

documentation/installation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ 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.4](https://classic.yarnpkg.com/en/docs/install/#mac-stable)
30+
1. Yarn version: [1.22.18](https://classic.yarnpkg.com/en/docs/install/#mac-stable)
3131
2. NodeJS version: 16.15.0, 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/

documentation/occ.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ 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-
- 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) )
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 ) )
7169
- Cybersource REST API Reference ( [HTML](https://developer.cybersource.com/api-reference-assets/index.html) )

documentation/package-contents.md

+3-1
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.4
24+
yarn run v1.22.18
2525
$ node ./bin/index.js
2626
Usage: index [options] [command]
2727

@@ -106,6 +106,7 @@ The following settings can be configured in gateway:
106106
| | |
107107
| **Credit Card** | |
108108
| **payerAuthEnabled** | Enables payer authentication for credit cards |
109+
| **scaEnabled** | If enabled card holder will be 3DS Challenged when saving a card |
109110
| **flexSdkUrl** | Credit Card Flex SDK URL |
110111
| **isCVVRequiredForSavedCards** | Is the CVV required when using a saved card. |
111112
| **isCVVRequiredForScheduledOrders** | Is the CVV required for a Scheduled Order |
@@ -282,6 +283,7 @@ server-extension
282283
┃ ┃ ┃ ┃ ┃ ┣ mappers
283284
┃ ┃ ┃ ┃ ┃ ┃ ┣ index.ts
284285
┃ ┃ ┃ ┃ ┃ ┃ ┣ payerAuthMapper.ts
286+
┃ ┃ ┃ ┃ ┃ ┃ ┣ scaMapper.ts
285287
┃ ┃ ┃ ┃ ┃ ┃ ┣ saleCardMapper.ts
286288
┃ ┃ ┃ ┃ ┃ ┃ ┣ saleGenericMapper.ts
287289
┃ ┃ ┃ ┃ ┃ ┃ ┗ savedCardPaymentMapper.ts

documentation/payment-services/credit-card.md

+17-3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
3. [Payer Authentication](#payer-authentication)
1010
1. [UI integration details](#ui-integration-details-1)
1111
2. [Backend (SSE) integration details](#backend-sse-integration-details-1)
12+
3. [Strong Customer Authentication (SCA)](#strong-customer-authentication-sca)
1213
4. [Capturing funds during authorization (SALE)](#capturing-funds-during-authorization-sale)
1314

1415
## Description
@@ -42,14 +43,16 @@ The following gateway settings apply to credit card payments
4243
|-------------------------------------|---------------------------------------------------------------------------------------------------|
4344
| **paymentMethodTypes** | Enabled Payment Methods. 'Credit & Debit Card' should be enabled |
4445
| **paymentOptions** | Payment options enabled for payment using Payment Widget. 'Credit & Debit Card' should be enabled |
45-
| **payerAuthEnabled** | Enables payer authentication (3D Secure) for credit cards | | |
46+
| **payerAuthEnabled** | Enables payer authentication (3D Secure) for credit cards |
47+
| **scaEnabled** | If enabled card holder will be 3DS Challenged when saving a card |
4648
| **saleEnabled** | Indicates if authorizing and taking payment will be done at the same time |
4749
| **isCVVRequiredForSavedCards** | Should be disabled as CVV is not required in backend |
4850
| **isCVVRequiredForScheduledOrders** | Should be disabled as CVV is not required in backend |
4951

5052
Default values:
5153

5254
- `payerAuthEnabled`: true. Payer authentication is enabled by default
55+
- `scaEnabled` : false
5356
- `isCVVRequiredForSavedCards`: false
5457
- `isCVVRequiredForScheduledOrders`: false
5558
- `saleEnabled` - by default SALE is disabled for Card payments. Can be enabled in OCC Admin
@@ -135,7 +138,6 @@ plugins
135138
 | | | ├── meta.js
136139
 | | | └── styles.css
137140
 | | ├── isv-payment-utility
138-
 | | | ├── common.js
139141
 | | | ├── flex-microform.js
140142
 | | | ├── flex-microForm-api.js
141143
 | | | └── script-loader.js
@@ -145,7 +147,9 @@ plugins
145147
 | | ├── meta.js
146148
 | | └── styles.css
147149
 | ├── .eslintrc
150+
| ├── constants.js
148151
 | ├── index.js
152+
| ├── isv-common.js
149153
 | └── meta.js
150154
 ├── endpoints
151155
 | ├── flex-microform-endpoint
@@ -261,10 +265,20 @@ The following UI component contains Payer Authentication integration logic `plug
261265

262266
#### Backend (SSE) integration details
263267

264-
- `server-extension/src/controllers/payerAuth.ts` Controller for generating a signed PayerAuth JWT
268+
- `server-extension/src/controllers/payerAuth.ts` Controller for payer auth setup
265269
- `server-extension/src/services/payments/converters/request/mappers/payerAuthEnrollMapper.ts` Including payer auth reference id into PSP card authorization request
266270
- `server-extension/src/services/payments/converters/request/mappers/payerAuthValidationMapper.ts` Including payer auth validation token into PSP card authorization request
267271

272+
#### Strong Customer Authentication (SCA)
273+
274+
When `Payer Authentication` is enabled, if a transaction gets declined with the reason as Strong Customer Authentication required, then another request will be sent from Oracle Commerce Cloud automatically for the same order and the customer will be 3DS challenged.
275+
276+
In case merchants would like the cardholder to be 3DS Challenged when saving a card `scaEnabled` gateway setting can be updated to enable it for credit cards.
277+
278+
In case 'Strong Customer Authentication' is enabled for credit cards, '10000' response code is sent back in Webhook response so that OCC becomes aware of that.
279+
280+
*Note:* The `scaEnabled` setting is applicable only if `Payer Authentication` is enabled.
281+
268282
### Capturing funds during authorization (SALE)
269283

270284
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.

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/merchantId.png)
11+
![Merchant Id](images/merchant-id.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-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"npmClient": "yarn",
33
"useWorkspaces": true,
4-
"version": "23.1.1",
4+
"version": "23.2.0",
55
"packages": ["packages/*"]
66
}

lib/sse/occ.js

+13-35
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//occ.js
22
const https = require('https');
3-
const request = require('request');
3+
const superagent = require('superagent');
44
const fs = require('fs-extra');
55
const common = require('../common/occ');
66
const path = require('path');
@@ -60,42 +60,20 @@ async function listSSEFiles(url, accessToken) {
6060

6161
async function doSSEFileUploadMultipart(url, accessToken, appName, archiveFile) {
6262
return new Promise((resolve, reject) => {
63-
/** Setup Progress Bar */
64-
const fileStream = fs.createReadStream(archiveFile);
65-
66-
request.post(
67-
`https://${url}/ccadmin/v1/serverExtensions`,
68-
{
69-
headers: {
70-
Authorization: 'Bearer ' + accessToken
71-
},
72-
formData: {
73-
filename: `${appName}.zip`,
74-
uploadType: 'extensions',
75-
force: 'true',
76-
fileUpload: {
77-
value: fileStream,
78-
options: {
79-
filename: `${appName}.zip`
80-
}
81-
}
82-
}
83-
},
84-
(err, httpResponse, body) => {
85-
if (!err && httpResponse.statusCode === 200) {
63+
superagent
64+
.post(`https://${url}/ccadmin/v1/serverExtensions`)
65+
.set("Authorization", 'Bearer ' + accessToken)
66+
.field('filename', `${appName}.zip`)
67+
.field('uploadType', 'extensions')
68+
.field('force', 'true')
69+
.attach('fileUpload', archiveFile)
70+
.end((err, res) => {
71+
if(res.status === 200){
8672
fs.removeSync(archiveFile);
87-
return resolve(body);
88-
} else {
89-
if (err) {
90-
message = err;
91-
} else {
92-
message = body;
93-
}
94-
return reject(message);
9573
}
96-
}
97-
);
98-
});
74+
resolve(res.text);
75+
});
76+
})
9977
}
10078

10179
function getExtensionServerLogs(url, accessToken, date = '', loggingLevel = 'debug') {

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "isv-occ-payment",
3-
"version": "23.1.1",
3+
"version": "23.2.0",
44
"description": "ISV Oracle Commerce Cloud Payment Plugin",
55
"main": "index.js",
66
"repository": "[email protected]:cybersource-tpi/cybersource-plugins-oraclecxcommerce.git",
@@ -68,7 +68,6 @@
6868
"dependencies": {
6969
"@popperjs/core": "^2.11.6",
7070
"jwt-decode": "^3.1.2",
71-
"request":"^2.88.2",
7271
"tsc-alias": "^1.7.1"
7372

7473
},

packages/applepay-payment-service/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@isv-occ-payment/applepay-payment-service",
3-
"version": "23.1.1",
3+
"version": "23.2.0",
44
"description": "ApplePay SSE Payment Service",
55
"repository": {
66
"type": "git",
@@ -9,10 +9,10 @@
99
"author": "ISV Payments",
1010
"main": "cjs/index.js",
1111
"dependencies": {
12-
"@isv-occ-payment/occ-payment-service": "23.1.1",
13-
"@isv-occ-payment/occ-sdk": "23.1.1",
14-
"@isv-occ-payment/payment-sdk": "23.1.1",
15-
"@isv-occ-payment/server-extension": "23.1.1",
12+
"@isv-occ-payment/occ-payment-service": "23.2.0",
13+
"@isv-occ-payment/occ-sdk": "23.2.0",
14+
"@isv-occ-payment/payment-sdk": "23.2.0",
15+
"@isv-occ-payment/server-extension": "23.2.0",
1616
"cybersource-rest-client": "0.0.43"
1717
},
1818
"devDependencies": {

packages/card-payment-service/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@isv-occ-payment/card-payment-service",
3-
"version": "23.1.1",
3+
"version": "23.2.0",
44
"description": "Card SSE Payment Service",
55
"repository": {
66
"type": "git",
@@ -9,10 +9,10 @@
99
"author": "ISV Payments",
1010
"main": "cjs/index.js",
1111
"dependencies": {
12-
"@isv-occ-payment/occ-payment-service": "23.1.1",
13-
"@isv-occ-payment/occ-sdk": "23.1.1",
14-
"@isv-occ-payment/payment-sdk": "23.1.1",
15-
"@isv-occ-payment/server-extension": "23.1.1",
12+
"@isv-occ-payment/occ-payment-service": "23.2.0",
13+
"@isv-occ-payment/occ-sdk": "23.2.0",
14+
"@isv-occ-payment/payment-sdk": "23.2.0",
15+
"@isv-occ-payment/server-extension": "23.2.0",
1616
"cybersource-rest-client": "0.0.43"
1717
},
1818
"devDependencies": {

packages/generic-payment-service/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@isv-occ-payment/generic-payment-service",
3-
"version": "23.1.1",
3+
"version": "23.2.0",
44
"description": "Generic SSE Payment Service",
55
"repository": {
66
"type": "git",
@@ -9,10 +9,10 @@
99
"author": "ISV Payments",
1010
"main": "cjs/index.js",
1111
"dependencies": {
12-
"@isv-occ-payment/occ-payment-service": "23.1.1",
13-
"@isv-occ-payment/occ-sdk": "23.1.1",
14-
"@isv-occ-payment/payment-sdk": "23.1.1",
15-
"@isv-occ-payment/server-extension": "23.1.1",
12+
"@isv-occ-payment/occ-payment-service": "23.2.0",
13+
"@isv-occ-payment/occ-sdk": "23.2.0",
14+
"@isv-occ-payment/payment-sdk": "23.2.0",
15+
"@isv-occ-payment/server-extension": "23.2.0",
1616
"cybersource-rest-client": "0.0.43"
1717
},
1818
"devDependencies": {

packages/googlepay-payment-service/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@isv-occ-payment/googlepay-payment-service",
3-
"version": "23.1.1",
3+
"version": "23.2.0",
44
"description": "GooglePay SSE Payment Service",
55
"repository": {
66
"type": "git",
@@ -9,10 +9,10 @@
99
"author": "ISV Payments",
1010
"main": "cjs/index.js",
1111
"dependencies": {
12-
"@isv-occ-payment/occ-payment-service": "23.1.1",
13-
"@isv-occ-payment/occ-sdk": "23.1.1",
14-
"@isv-occ-payment/payment-sdk": "23.1.1",
15-
"@isv-occ-payment/server-extension": "23.1.1",
12+
"@isv-occ-payment/occ-payment-service": "23.2.0",
13+
"@isv-occ-payment/occ-sdk": "23.2.0",
14+
"@isv-occ-payment/payment-sdk": "23.2.0",
15+
"@isv-occ-payment/server-extension": "23.2.0",
1616
"cybersource-rest-client": "0.0.43"
1717
},
1818
"devDependencies": {

packages/occ-mock-server/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@isv-occ-payment/occ-mock-server",
3-
"version": "23.1.1",
3+
"version": "23.2.0",
44
"private": true,
55
"description": "Mock OCC APIs",
66
"repository": {
@@ -22,7 +22,7 @@
2222
"ssl_port": "5001"
2323
},
2424
"dependencies": {
25-
"@isv-occ-payment/payment-gateway": "23.1.1",
25+
"@isv-occ-payment/payment-gateway": "23.2.0",
2626
"@types/json-server": "^0.14.2",
2727
"json-server": "^0.17.1",
2828
"node-fetch": "^3.3.0"

packages/occ-payment-factory/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@isv-occ-payment/occ-payment-factory",
3-
"version": "23.1.1",
3+
"version": "23.2.0",
44
"private": true,
55
"description": "Oracle Commerce payment service factory",
66
"repository": {

packages/occ-payment-service/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@isv-occ-payment/occ-payment-service",
3-
"version": "23.1.1",
3+
"version": "23.2.0",
44
"description": "Oracle Commerce payment service",
55
"repository": {
66
"type": "git",

packages/occ-sdk/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@isv-occ-payment/occ-sdk",
3-
"version": "23.1.1",
3+
"version": "23.2.0",
44
"private": true,
55
"description": "OCC SDK",
66
"repository": {

0 commit comments

Comments
 (0)