@licklist/design 0.70.0-dev.2 → 0.70.0-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.js +3 -3
- package/dist/iframe/ryft/utils/ryft-form.js +2 -2
- package/package.json +3 -3
- package/src/iframe/ryft/RyftPaymentForm.tsx +4 -2
- package/src/iframe/ryft/utils/ryft-form.ts +2 -2
- package/yarn.lock +778 -750
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RyftPaymentForm.d.ts","sourceRoot":"","sources":["../../../src/iframe/ryft/RyftPaymentForm.tsx"],"names":[],"mappings":"AAOA,OAAO,
|
|
1
|
+
{"version":3,"file":"RyftPaymentForm.d.ts","sourceRoot":"","sources":["../../../src/iframe/ryft/RyftPaymentForm.tsx"],"names":[],"mappings":"AAOA,OAAO,EAML,sBAAsB,EACvB,MAAM,kDAAkD,CAAA;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0EAA0E,CAAA;AAKlH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAW/C,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AAEzD,MAAM,WAAW,oBAAoB;IAEnC,SAAS,EAAE,GAAG,CAAA;IACd,eAAe,EAAE,OAAO,CAAA;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAA;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,EAAE,CACR,SAAS,EAAE,MAAM,IAAI,EACrB,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,KAChC,OAAO,CAAC,IAAI,CAAC,CAAA;IAClB,QAAQ,EAAE,MAAM,OAAO,CAAC,sBAAsB,CAAC,CAAA;IAC/C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,uBAAuB,CAAC,EAAE,uBAAuB,CAAA;CAClD;AAED,eAAO,MAAM,eAAe,8JAUzB,oBAAoB,4CA+KtB,CAAA"}
|
|
@@ -5,7 +5,7 @@ import { useForm } from 'react-hook-form';
|
|
|
5
5
|
import Button from 'react-bootstrap/Button';
|
|
6
6
|
import { useHistory } from 'react-router-dom';
|
|
7
7
|
import Alert from 'react-bootstrap/Alert';
|
|
8
|
-
import { useRyftPayment, RYFT_STATUS_PENDING_ACTION, RYFT_STATUS_APPROVED, RYFT_STATUS_CAPTURED } from '@licklist/plugins/dist/hooks/Ryft/useRyftPayment';
|
|
8
|
+
import { useRyftPayment, RYFT_STATUS_PENDING_ACTION, RYFT_STATUS_APPROVED, RYFT_STATUS_CAPTURED, RYFT_STATUS_PENDING_PAYMENT } from '@licklist/plugins/dist/hooks/Ryft/useRyftPayment';
|
|
9
9
|
import '../../static/index.js';
|
|
10
10
|
import { injectComponentsInRyftForm } from './utils/ryft-form.js';
|
|
11
11
|
import { ButtonLoader } from '../../static/loader/ButtonLoader.js';
|
|
@@ -220,7 +220,7 @@ var RyftPaymentForm = function(param) {
|
|
|
220
220
|
if (!(paymentSession === null || paymentSession === void 0 ? void 0 : paymentSession.id) || !(paymentSession === null || paymentSession === void 0 ? void 0 : paymentSession.returnUrl)) return;
|
|
221
221
|
// Handle there cases when orderStatus - Captured, Approved,
|
|
222
222
|
// or when no redirect URL and orderStatus - PendingAction
|
|
223
|
-
window.location.href = "".concat(paymentSession.returnUrl, "&
|
|
223
|
+
window.location.href = "".concat(paymentSession.returnUrl, "&paymentSessionId=").concat(paymentSession.id);
|
|
224
224
|
setReferrerBeforePayment();
|
|
225
225
|
};
|
|
226
226
|
var handleSubmit = function() {
|
|
@@ -257,7 +257,7 @@ var RyftPaymentForm = function(param) {
|
|
|
257
257
|
window.location.href = paymentSession.requiredAction.url;
|
|
258
258
|
setReferrerBeforePayment();
|
|
259
259
|
}
|
|
260
|
-
if (paymentSession.status === RYFT_STATUS_APPROVED || paymentSession.status === RYFT_STATUS_CAPTURED) {
|
|
260
|
+
if (paymentSession.status === RYFT_STATUS_APPROVED || paymentSession.status === RYFT_STATUS_CAPTURED || paymentSession.status === RYFT_STATUS_PENDING_PAYMENT) {
|
|
261
261
|
redirectOnFailAttempt(paymentSession);
|
|
262
262
|
return [
|
|
263
263
|
2
|
|
@@ -49,11 +49,11 @@ var injectComponentsInRyftForm = function(param) {
|
|
|
49
49
|
var appleButton = document.getElementById('ryft-pay-apple-pay-button');
|
|
50
50
|
if (googleButton) {
|
|
51
51
|
googleButton.disabled = isDisableButton;
|
|
52
|
-
googleButton.style.opacity = isDisableButton ? '1' : '0.6';
|
|
52
|
+
googleButton.style.opacity = !isDisableButton ? '1' : '0.6';
|
|
53
53
|
}
|
|
54
54
|
if (appleButton) {
|
|
55
55
|
appleButton.disabled = isDisableButton;
|
|
56
|
-
appleButton.style.opacity = isDisableButton ? '1' : '0.6';
|
|
56
|
+
appleButton.style.opacity = !isDisableButton ? '1' : '0.6';
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
if (isAppUsingInIframe) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@licklist/design",
|
|
3
|
-
"version": "0.70.0-dev.
|
|
3
|
+
"version": "0.70.0-dev.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@licklist/core": "0.31.0-dev.0",
|
|
46
46
|
"@licklist/eslint-config": "0.5.6",
|
|
47
|
-
"@licklist/plugins": "0.34.0-dev.
|
|
47
|
+
"@licklist/plugins": "0.34.0-dev.4",
|
|
48
48
|
"lodash": "4.17.21",
|
|
49
49
|
"luxon": "3.5.0",
|
|
50
50
|
"react": "17.0.2",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@fortawesome/free-solid-svg-icons": "5.15.2",
|
|
64
64
|
"@licklist/core": "0.31.0-dev.0",
|
|
65
65
|
"@licklist/eslint-config": "0.5.6",
|
|
66
|
-
"@licklist/plugins": "0.34.0-dev.
|
|
66
|
+
"@licklist/plugins": "0.34.0-dev.4",
|
|
67
67
|
"@mantine/core": "6.0.22",
|
|
68
68
|
"@mantine/hooks": "6.0.22",
|
|
69
69
|
"@mdx-js/react": "1.6.22",
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
RYFT_STATUS_APPROVED,
|
|
11
11
|
RYFT_STATUS_CAPTURED,
|
|
12
12
|
RYFT_STATUS_PENDING_ACTION,
|
|
13
|
+
RYFT_STATUS_PENDING_PAYMENT,
|
|
13
14
|
AttemptPaymentResponse,
|
|
14
15
|
} from '@licklist/plugins/dist/hooks/Ryft/useRyftPayment'
|
|
15
16
|
import { ProviderPaymentSettings } from '@licklist/core/dist/DataMapper/Setting/ProviderPaymentSettingsDataMapper'
|
|
@@ -84,7 +85,7 @@ export const RyftPaymentForm = ({
|
|
|
84
85
|
|
|
85
86
|
// Handle there cases when orderStatus - Captured, Approved,
|
|
86
87
|
// or when no redirect URL and orderStatus - PendingAction
|
|
87
|
-
window.location.href = `${paymentSession.returnUrl}&
|
|
88
|
+
window.location.href = `${paymentSession.returnUrl}&paymentSessionId=${paymentSession.id}`
|
|
88
89
|
setReferrerBeforePayment()
|
|
89
90
|
}
|
|
90
91
|
|
|
@@ -112,7 +113,8 @@ export const RyftPaymentForm = ({
|
|
|
112
113
|
|
|
113
114
|
if (
|
|
114
115
|
paymentSession.status === RYFT_STATUS_APPROVED ||
|
|
115
|
-
paymentSession.status === RYFT_STATUS_CAPTURED
|
|
116
|
+
paymentSession.status === RYFT_STATUS_CAPTURED ||
|
|
117
|
+
paymentSession.status === RYFT_STATUS_PENDING_PAYMENT
|
|
116
118
|
) {
|
|
117
119
|
redirectOnFailAttempt(paymentSession)
|
|
118
120
|
return
|
|
@@ -76,11 +76,11 @@ export const injectComponentsInRyftForm = ({
|
|
|
76
76
|
) as HTMLButtonElement
|
|
77
77
|
if (googleButton) {
|
|
78
78
|
googleButton.disabled = isDisableButton
|
|
79
|
-
googleButton.style.opacity = isDisableButton ? '1' : '0.6'
|
|
79
|
+
googleButton.style.opacity = !isDisableButton ? '1' : '0.6'
|
|
80
80
|
}
|
|
81
81
|
if (appleButton) {
|
|
82
82
|
appleButton.disabled = isDisableButton
|
|
83
|
-
appleButton.style.opacity = isDisableButton ? '1' : '0.6'
|
|
83
|
+
appleButton.style.opacity = !isDisableButton ? '1' : '0.6'
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
|