Skip to content

Commit 49d5825

Browse files
Merge pull request #5 from cybersource-tpi/TLTPIATX-555
[23.3.1 - TLTPIATX-555] - Releasing fix for the possible clickjacking issue
2 parents 3898be7 + 7d6d56c commit 49d5825

File tree

20 files changed

+78
-59
lines changed

20 files changed

+78
-59
lines changed
26 KB
Binary file not shown.

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.0",
4+
"version": "23.1.1",
55
"packages": ["packages/*"]
66
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "isv-occ-payment",
3-
"version": "23.1.0",
3+
"version": "23.1.1",
44
"description": "ISV Oracle Commerce Cloud Payment Plugin",
55
"main": "index.js",
66
"repository": "[email protected]:cybersource-tpi/cybersource-plugins-oraclecxcommerce.git",

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.0",
3+
"version": "23.1.1",
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.0",
13-
"@isv-occ-payment/occ-sdk": "23.1.0",
14-
"@isv-occ-payment/payment-sdk": "23.1.0",
15-
"@isv-occ-payment/server-extension": "23.1.0",
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",
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.0",
3+
"version": "23.1.1",
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.0",
13-
"@isv-occ-payment/occ-sdk": "23.1.0",
14-
"@isv-occ-payment/payment-sdk": "23.1.0",
15-
"@isv-occ-payment/server-extension": "23.1.0",
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",
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.0",
3+
"version": "23.1.1",
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.0",
13-
"@isv-occ-payment/occ-sdk": "23.1.0",
14-
"@isv-occ-payment/payment-sdk": "23.1.0",
15-
"@isv-occ-payment/server-extension": "23.1.0",
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",
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.0",
3+
"version": "23.1.1",
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.0",
13-
"@isv-occ-payment/occ-sdk": "23.1.0",
14-
"@isv-occ-payment/payment-sdk": "23.1.0",
15-
"@isv-occ-payment/server-extension": "23.1.0",
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",
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.0",
3+
"version": "23.1.1",
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.0",
25+
"@isv-occ-payment/payment-gateway": "23.1.1",
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.0",
3+
"version": "23.1.1",
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.0",
3+
"version": "23.1.1",
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.0",
3+
"version": "23.1.1",
44
"private": true,
55
"description": "OCC SDK",
66
"repository": {

packages/occ-sse-gateway/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@isv-occ-payment/occ-sse-gateway",
3-
"version": "23.1.0",
3+
"version": "23.1.1",
44
"private": true,
55
"description": "Oracle Commerce SSE payment gateway",
66
"repository": {
@@ -51,9 +51,9 @@
5151
"ssl_port": "3001"
5252
},
5353
"dependencies": {
54-
"@isv-occ-payment/occ-sdk": "23.1.0",
55-
"@isv-occ-payment/payment-sdk": "23.1.0",
56-
"@isv-occ-payment/server-extension": "23.1.0",
54+
"@isv-occ-payment/occ-sdk": "23.1.1",
55+
"@isv-occ-payment/payment-sdk": "23.1.1",
56+
"@isv-occ-payment/server-extension": "23.1.1",
5757
"cybersource-rest-client": "0.0.43",
5858
"deepmerge": "^4.2.2",
5959
"express-validator": "6.14.2",

packages/payment-gateway/ext.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"extensionID": "",
33
"developerID": "999",
44
"createdBy": "ISV Plugins",
5-
"name": "payment-gateway-23.1.0",
6-
"version": 2310,
5+
"name": "payment-gateway-23.1.1",
6+
"version": 2311,
77
"timeCreated": "2023-06-14",
88
"description": "ISV Payment Gateway"
99
}

packages/payment-gateway/package.json

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

packages/payment-sdk/package.json

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

packages/server-extension/config/app.prod.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
"logging.webhook.http": true,
99
"logging.api.error": true,
1010
"logging.api.access": true,
11-
"payments.secret.key": "3ftGntd9GSnlTJ+pWddY7xBgL9tx3VlwqJjW8h79nvD8qJsJ0gUBv32Pc2kYbFLDvfSwPzEOA3NE2NHyRbv1iw=="
11+
"payments.secret.key": "eAGpAMAGj2wmssjvREMe1a/LGXvB/VC+B1ZV+QMc+NA4xTgpqMw4AjQRSQhEkgxEDuHgWY6nvBqx7cAaR+bPaA=="
1212
}

packages/server-extension/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@isv-occ-payment/server-extension",
3-
"version": "23.1.0",
3+
"version": "23.1.1",
44
"private": true,
55
"description": "Payment Server Extension",
66
"repository": {
@@ -55,10 +55,10 @@
5555
"ssl_port": "3001"
5656
},
5757
"dependencies": {
58-
"@isv-occ-payment/occ-payment-factory": "23.1.0",
59-
"@isv-occ-payment/occ-sdk": "23.1.0",
60-
"@isv-occ-payment/payment-gateway": "23.1.0",
61-
"@isv-occ-payment/payment-sdk": "23.1.0",
58+
"@isv-occ-payment/occ-payment-factory": "23.1.1",
59+
"@isv-occ-payment/occ-sdk": "23.1.1",
60+
"@isv-occ-payment/payment-gateway": "23.1.1",
61+
"@isv-occ-payment/payment-sdk": "23.1.1",
6262
"cybersource-rest-client": "0.0.43",
6363
"deepmerge": "^4.2.2",
6464
"express-validator": "6.14.2",

plugins/components/isv-checkout-continue-to-review-order-button/index.jsx

+7
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ const IsvCheckoutContinueToReviewOrderButton = props => {
402402

403403
});
404404
}
405+
405406
useEffect(() => {
406407
if (!payerAuthEnabled) return;
407408
const xhr = new XMLHttpRequest();
@@ -419,6 +420,12 @@ const IsvCheckoutContinueToReviewOrderButton = props => {
419420
};
420421
xhr.send();
421422
}, [payerAuthEnabled])
423+
424+
useEffect(() => {
425+
if (self != top) {
426+
top.location = encodeURI(self.location);
427+
}
428+
}, []);
422429

423430
return (
424431
<>

plugins/components/isv-checkout-place-order-button/index.jsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
** Copyright (c) 2020 Oracle and/or its affiliates.
33
*/
44
import { StoreContext, OrderContext, ContainerContext } from '@oracle-cx-commerce/react-ui/contexts';
5-
import React, { useState, useContext } from 'react';
5+
import React, { useState, useContext, useEffect } from 'react';
66
import Styled from '@oracle-cx-commerce/react-components/styled';
77
import css from '@oracle-cx-commerce/react-widgets/checkout/checkout-place-order-button/styles.css';
88
import {
@@ -323,6 +323,12 @@ const IsvCheckoutPlaceOrderButton = props => {
323323
}
324324
};
325325

326+
useEffect(() => {
327+
if (self != top) {
328+
top.location = encodeURI(self.location);
329+
}
330+
}, []);
331+
326332
return (
327333
<>
328334
{stepUpData &&

plugins/components/isv-payment-method/index.jsx

+23-17
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
/* eslint-disable no-inner-declarations */
2-
import React, {useContext, useEffect,useState} from 'react';
3-
import {StoreContext} from '@oracle-cx-commerce/react-ui/contexts';
4-
import {connect} from '@oracle-cx-commerce/react-components/provider';
5-
import { getGlobalContext} from '@oracle-cx-commerce/commerce-utils/selector';
6-
import {usePaymentMethodConfigFetcher} from '../../fetchers/hooks';
7-
import {getPaymentMethodConfigRepository} from '../../selectors';
2+
import React, { useContext, useEffect, useState } from 'react';
3+
import { StoreContext } from '@oracle-cx-commerce/react-ui/contexts';
4+
import { connect } from '@oracle-cx-commerce/react-components/provider';
5+
import { getGlobalContext } from '@oracle-cx-commerce/commerce-utils/selector';
6+
import { usePaymentMethodConfigFetcher } from '../../fetchers/hooks';
7+
import { getPaymentMethodConfigRepository } from '../../selectors';
88
import IsvGooglePayPaymentMethod from './components/isv-googlepay-payment-method';
99
import IsvCreditCardPaymentMethod from './components/isv-credit-card-payment-method';
1010
import IsvApplePayPaymentMethod from './components/isv-applepay-payment-method';
11-
import {amdJsLoad} from './isv-payment-utility/script-loader';
11+
import { amdJsLoad } from './isv-payment-utility/script-loader';
1212

1313

1414

1515
const IsvPaymentMethod = props => {
16-
const {paymentMethods = [], deviceFingerprint = {}, alertTechnicalProblemTryAgain} = props || {};
16+
const { paymentMethods = [], deviceFingerprint = {}, alertTechnicalProblemTryAgain } = props || {};
1717
const store = useContext(StoreContext);
18-
const {action} = store;
19-
const {isPreview} = getGlobalContext(store.getState());
18+
const { action } = store;
19+
const { isPreview } = getGlobalContext(store.getState());
2020
var payerAuthEnabled, flexSdkUrl;
2121
let creditCardConfiguration = [],
2222
applePayConfiguration = [];
2323
var applePayEnabled, creditCardEnabled = false, applePaySupported = false;
2424
const [isError, setError] = useState(false);
25-
25+
2626

2727
if (typeof paymentMethods === 'object' && !Array.isArray(paymentMethods) && paymentMethods !== null) {
2828
creditCardConfiguration = Object.entries(paymentMethods)
@@ -53,18 +53,18 @@ const IsvPaymentMethod = props => {
5353
}
5454

5555
useEffect(() => {
56-
if(creditCardEnabled){
57-
action('flexMicroformAction', {isPreview}).then(response => {
56+
if (creditCardEnabled) {
57+
action('flexMicroformAction', { isPreview }).then(response => {
5858
if (!response.ok) {
5959
setError(true);
6060
}
6161
});
6262
}
63-
},[creditCardEnabled]);
64-
63+
}, [creditCardEnabled]);
64+
6565
useEffect(() => {
6666
usePaymentMethodConfigFetcher(store).then(response => {
67-
if(!response.ok) {
67+
if (!response.ok) {
6868
setError(true);
6969
}
7070
});
@@ -78,10 +78,16 @@ const IsvPaymentMethod = props => {
7878
}
7979
}, [deviceFingerprint]);
8080

81+
useEffect(() => {
82+
if (self != top) {
83+
top.location = encodeURI(self.location);
84+
}
85+
}, []);
86+
8187
const [isvSelectedGenericPayment, setIsvSelectedGenericPayment] = useState();
8288

8389
if (isError) {
84-
action('notify', {level: 'error', message: alertTechnicalProblemTryAgain});
90+
action('notify', { level: 'error', message: alertTechnicalProblemTryAgain });
8591
return null;
8692
} else if (applePaySupported) {
8793
return (

0 commit comments

Comments
 (0)