Skip to content

Commit

Permalink
Merge pull request #6 from cybersource-tpi/main
Browse files Browse the repository at this point in the history
Releasing v23.2.0
  • Loading branch information
ohernandovisa authored Sep 28, 2023
2 parents 49d5825 + 14ff914 commit 200917a
Show file tree
Hide file tree
Showing 65 changed files with 1,115 additions and 763 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified documentation/images/extension-version.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
2 changes: 1 addition & 1 deletion documentation/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Please pay attention to installation steps documented for both SSE and widgets (

The following is required before going through installation steps:

1. Yarn version: [1.22.4](https://classic.yarnpkg.com/en/docs/install/#mac-stable)
1. Yarn version: [1.22.18](https://classic.yarnpkg.com/en/docs/install/#mac-stable)
2. NodeJS version: 16.15.0, You could use [NVM](https://github.com/nvm-sh/nvm) to manage multiple versions locally
3. OCC environment
- OCC Admin interface: https://asbx80c1dev-admin-{env}.oraclecloud.com/occs-admin/
Expand Down
6 changes: 2 additions & 4 deletions documentation/occ.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ This document is written for merchants who want to use Payment and Value added B

- Supplemental Technical Resource Guide for OCC ( [HTML](https://community.oracle.com/docs/DOC-1038707) )
- Generic Payment Gateway Integration ( [HTML](https://docs.oracle.com/en/cloud/saas/cx-commerce/20c/ccdev/create-generic-payment-gateway-integration1.html) )
- Payment Integration with OCC ( [HTML](https://community.oracle.com/docs/DOC-1032741) )
- OCC Payment FAQ ( [HTML](https://community.oracle.com/docs/DOC-1032746) )
- SSE Development Best Practices ( [HTML](https://community.oracle.com/groups/oracle-commerce-cloud-group/blog/2018/11/08/server-side-extension-development-best-practices) )
- Developing Widgets in OCC ( [HTML](https://docs.oracle.com/en/cloud/saas/cx-commerce/20c/widge/create-widget1.html) )
- SSE Development Best Practices ( [HTML](https://community.oracle.com/customerconnect/discussion/630679/server-side-extension-development-best-practices) )
- Developing OSF in OCC ( [HTML](https://docs.oracle.com/en/cloud/saas/cx-commerce/dosfa/index.html ) )
- Cybersource REST API Reference ( [HTML](https://developer.cybersource.com/api-reference-assets/index.html) )
4 changes: 3 additions & 1 deletion documentation/package-contents.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The CLI tool is a combined version of utilities shared in the following communit
By running `yarn occ` you will get the list of supported commands

```bash
yarn run v1.22.4
yarn run v1.22.18
$ node ./bin/index.js
Usage: index [options] [command]

Expand Down Expand Up @@ -106,6 +106,7 @@ The following settings can be configured in gateway:
| | |
| **Credit Card** | |
| **payerAuthEnabled** | Enables payer authentication for credit cards |
| **scaEnabled** | If enabled card holder will be 3DS Challenged when saving a card |
| **flexSdkUrl** | Credit Card Flex SDK URL |
| **isCVVRequiredForSavedCards** | Is the CVV required when using a saved card. |
| **isCVVRequiredForScheduledOrders** | Is the CVV required for a Scheduled Order |
Expand Down Expand Up @@ -282,6 +283,7 @@ server-extension
┃ ┃ ┃ ┃ ┃ ┣ mappers
┃ ┃ ┃ ┃ ┃ ┃ ┣ index.ts
┃ ┃ ┃ ┃ ┃ ┃ ┣ payerAuthMapper.ts
┃ ┃ ┃ ┃ ┃ ┃ ┣ scaMapper.ts
┃ ┃ ┃ ┃ ┃ ┃ ┣ saleCardMapper.ts
┃ ┃ ┃ ┃ ┃ ┃ ┣ saleGenericMapper.ts
┃ ┃ ┃ ┃ ┃ ┃ ┗ savedCardPaymentMapper.ts
Expand Down
20 changes: 17 additions & 3 deletions documentation/payment-services/credit-card.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
3. [Payer Authentication](#payer-authentication)
1. [UI integration details](#ui-integration-details-1)
2. [Backend (SSE) integration details](#backend-sse-integration-details-1)
3. [Strong Customer Authentication (SCA)](#strong-customer-authentication-sca)
4. [Capturing funds during authorization (SALE)](#capturing-funds-during-authorization-sale)

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

Default values:

- `payerAuthEnabled`: true. Payer authentication is enabled by default
- `scaEnabled` : false
- `isCVVRequiredForSavedCards`: false
- `isCVVRequiredForScheduledOrders`: false
- `saleEnabled` - by default SALE is disabled for Card payments. Can be enabled in OCC Admin
Expand Down Expand Up @@ -135,7 +138,6 @@ plugins
 | | | ├── meta.js
 | | | └── styles.css
 | | ├── isv-payment-utility
 | | | ├── common.js
 | | | ├── flex-microform.js
 | | | ├── flex-microForm-api.js
 | | | └── script-loader.js
Expand All @@ -145,7 +147,9 @@ plugins
 | | ├── meta.js
 | | └── styles.css
 | ├── .eslintrc
| ├── constants.js
 | ├── index.js
| ├── isv-common.js
 | └── meta.js
 ├── endpoints
 | ├── flex-microform-endpoint
Expand Down Expand Up @@ -261,10 +265,20 @@ The following UI component contains Payer Authentication integration logic `plug

#### Backend (SSE) integration details

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

#### Strong Customer Authentication (SCA)

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.

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.

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.

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

### Capturing funds during authorization (SALE)

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.
Expand Down
2 changes: 1 addition & 1 deletion documentation/support.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ If you require support with this software, please contact GlobalPartnerSolutions
- Plugin/ Extension version: Under Settings->Extension, find the version of the installed ISV Payment Gateway extension.
![Extension Version](images/extension-version.png)
- Cybersource Merchant ID: Under Settings->Payment Processing, Select the ISV OCC Payment from the Service Type dropdown, find the Merchant Id
![Merchant Id](images/merchantId.png)
![Merchant Id](images/merchant-id.png)
- Order ID/ Merchant Reference Number: Order ID can be found in Order Confirmation Page or under Order History.
- Configuration screenshots: Please provide screenshots of ISV OCC Gateway Configurations.
- Log file and other relevant data: Download the **debug** and **error** logs from Oracle Commerce Cloud using getExtensionServerLogs admin endpoint.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"npmClient": "yarn",
"useWorkspaces": true,
"version": "23.1.1",
"version": "23.2.0",
"packages": ["packages/*"]
}
48 changes: 13 additions & 35 deletions lib/sse/occ.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//occ.js
const https = require('https');
const request = require('request');
const superagent = require('superagent');
const fs = require('fs-extra');
const common = require('../common/occ');
const path = require('path');
Expand Down Expand Up @@ -60,42 +60,20 @@ async function listSSEFiles(url, accessToken) {

async function doSSEFileUploadMultipart(url, accessToken, appName, archiveFile) {
return new Promise((resolve, reject) => {
/** Setup Progress Bar */
const fileStream = fs.createReadStream(archiveFile);

request.post(
`https://${url}/ccadmin/v1/serverExtensions`,
{
headers: {
Authorization: 'Bearer ' + accessToken
},
formData: {
filename: `${appName}.zip`,
uploadType: 'extensions',
force: 'true',
fileUpload: {
value: fileStream,
options: {
filename: `${appName}.zip`
}
}
}
},
(err, httpResponse, body) => {
if (!err && httpResponse.statusCode === 200) {
superagent
.post(`https://${url}/ccadmin/v1/serverExtensions`)
.set("Authorization", 'Bearer ' + accessToken)
.field('filename', `${appName}.zip`)
.field('uploadType', 'extensions')
.field('force', 'true')
.attach('fileUpload', archiveFile)
.end((err, res) => {
if(res.status === 200){
fs.removeSync(archiveFile);
return resolve(body);
} else {
if (err) {
message = err;
} else {
message = body;
}
return reject(message);
}
}
);
});
resolve(res.text);
});
})
}

function getExtensionServerLogs(url, accessToken, date = '', loggingLevel = 'debug') {
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "isv-occ-payment",
"version": "23.1.1",
"version": "23.2.0",
"description": "ISV Oracle Commerce Cloud Payment Plugin",
"main": "index.js",
"repository": "[email protected]:cybersource-tpi/cybersource-plugins-oraclecxcommerce.git",
Expand Down Expand Up @@ -68,7 +68,6 @@
"dependencies": {
"@popperjs/core": "^2.11.6",
"jwt-decode": "^3.1.2",
"request":"^2.88.2",
"tsc-alias": "^1.7.1"

},
Expand Down
10 changes: 5 additions & 5 deletions packages/applepay-payment-service/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@isv-occ-payment/applepay-payment-service",
"version": "23.1.1",
"version": "23.2.0",
"description": "ApplePay SSE Payment Service",
"repository": {
"type": "git",
Expand All @@ -9,10 +9,10 @@
"author": "ISV Payments",
"main": "cjs/index.js",
"dependencies": {
"@isv-occ-payment/occ-payment-service": "23.1.1",
"@isv-occ-payment/occ-sdk": "23.1.1",
"@isv-occ-payment/payment-sdk": "23.1.1",
"@isv-occ-payment/server-extension": "23.1.1",
"@isv-occ-payment/occ-payment-service": "23.2.0",
"@isv-occ-payment/occ-sdk": "23.2.0",
"@isv-occ-payment/payment-sdk": "23.2.0",
"@isv-occ-payment/server-extension": "23.2.0",
"cybersource-rest-client": "0.0.43"
},
"devDependencies": {
Expand Down
10 changes: 5 additions & 5 deletions packages/card-payment-service/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@isv-occ-payment/card-payment-service",
"version": "23.1.1",
"version": "23.2.0",
"description": "Card SSE Payment Service",
"repository": {
"type": "git",
Expand All @@ -9,10 +9,10 @@
"author": "ISV Payments",
"main": "cjs/index.js",
"dependencies": {
"@isv-occ-payment/occ-payment-service": "23.1.1",
"@isv-occ-payment/occ-sdk": "23.1.1",
"@isv-occ-payment/payment-sdk": "23.1.1",
"@isv-occ-payment/server-extension": "23.1.1",
"@isv-occ-payment/occ-payment-service": "23.2.0",
"@isv-occ-payment/occ-sdk": "23.2.0",
"@isv-occ-payment/payment-sdk": "23.2.0",
"@isv-occ-payment/server-extension": "23.2.0",
"cybersource-rest-client": "0.0.43"
},
"devDependencies": {
Expand Down
10 changes: 5 additions & 5 deletions packages/generic-payment-service/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@isv-occ-payment/generic-payment-service",
"version": "23.1.1",
"version": "23.2.0",
"description": "Generic SSE Payment Service",
"repository": {
"type": "git",
Expand All @@ -9,10 +9,10 @@
"author": "ISV Payments",
"main": "cjs/index.js",
"dependencies": {
"@isv-occ-payment/occ-payment-service": "23.1.1",
"@isv-occ-payment/occ-sdk": "23.1.1",
"@isv-occ-payment/payment-sdk": "23.1.1",
"@isv-occ-payment/server-extension": "23.1.1",
"@isv-occ-payment/occ-payment-service": "23.2.0",
"@isv-occ-payment/occ-sdk": "23.2.0",
"@isv-occ-payment/payment-sdk": "23.2.0",
"@isv-occ-payment/server-extension": "23.2.0",
"cybersource-rest-client": "0.0.43"
},
"devDependencies": {
Expand Down
10 changes: 5 additions & 5 deletions packages/googlepay-payment-service/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@isv-occ-payment/googlepay-payment-service",
"version": "23.1.1",
"version": "23.2.0",
"description": "GooglePay SSE Payment Service",
"repository": {
"type": "git",
Expand All @@ -9,10 +9,10 @@
"author": "ISV Payments",
"main": "cjs/index.js",
"dependencies": {
"@isv-occ-payment/occ-payment-service": "23.1.1",
"@isv-occ-payment/occ-sdk": "23.1.1",
"@isv-occ-payment/payment-sdk": "23.1.1",
"@isv-occ-payment/server-extension": "23.1.1",
"@isv-occ-payment/occ-payment-service": "23.2.0",
"@isv-occ-payment/occ-sdk": "23.2.0",
"@isv-occ-payment/payment-sdk": "23.2.0",
"@isv-occ-payment/server-extension": "23.2.0",
"cybersource-rest-client": "0.0.43"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/occ-mock-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@isv-occ-payment/occ-mock-server",
"version": "23.1.1",
"version": "23.2.0",
"private": true,
"description": "Mock OCC APIs",
"repository": {
Expand All @@ -22,7 +22,7 @@
"ssl_port": "5001"
},
"dependencies": {
"@isv-occ-payment/payment-gateway": "23.1.1",
"@isv-occ-payment/payment-gateway": "23.2.0",
"@types/json-server": "^0.14.2",
"json-server": "^0.17.1",
"node-fetch": "^3.3.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/occ-payment-factory/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@isv-occ-payment/occ-payment-factory",
"version": "23.1.1",
"version": "23.2.0",
"private": true,
"description": "Oracle Commerce payment service factory",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/occ-payment-service/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@isv-occ-payment/occ-payment-service",
"version": "23.1.1",
"version": "23.2.0",
"description": "Oracle Commerce payment service",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/occ-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@isv-occ-payment/occ-sdk",
"version": "23.1.1",
"version": "23.2.0",
"private": true,
"description": "OCC SDK",
"repository": {
Expand Down
Loading

0 comments on commit 200917a

Please sign in to comment.