@newskit-render/my-account 7.20.3 → 7.21.0
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/cjs/Components/Sections/Form/Payment/Zuora/Zuora.d.ts +4 -0
- package/dist/cjs/Components/Sections/Form/Payment/Zuora/Zuora.js +264 -0
- package/dist/cjs/Components/Sections/Form/Payment/Zuora/Zuora.js.map +1 -0
- package/dist/cjs/Components/Sections/Form/Payment/Zuora/index.d.ts +2 -7
- package/dist/cjs/Components/Sections/Form/Payment/Zuora/index.js +5 -234
- package/dist/cjs/Components/Sections/Form/Payment/Zuora/index.js.map +1 -1
- package/dist/cjs/Components/Sections/Form/Payment/Zuora/styled.d.ts +13 -0
- package/dist/cjs/Components/Sections/Form/Payment/Zuora/styled.js +16 -0
- package/dist/cjs/Components/Sections/Form/Payment/Zuora/styled.js.map +1 -0
- package/dist/cjs/Components/Sections/Form/Payment/Zuora/types.d.ts +5 -4
- package/dist/cjs/Components/Sections/Form/Payment/index.d.ts +2 -2
- package/dist/cjs/Components/Sections/Form/Payment/index.js.map +1 -1
- package/dist/cjs/Components/Sections/Form/Phone/Phone.js +5 -5
- package/dist/cjs/Components/Sections/Form/Phone/{styles.js → styled.js} +1 -1
- package/dist/cjs/Components/Sections/Form/Phone/{styles.js.map → styled.js.map} +1 -1
- package/dist/cjs/Components/Templates/PaymentRender.js.map +1 -1
- package/dist/cjs/context/types.d.ts +3 -3
- package/dist/cjs/pages/Payment/Payment.js +2 -2
- package/dist/cjs/pages/Payment/Payment.js.map +1 -1
- package/dist/cjs/pages/types.d.ts +3 -3
- package/dist/cjs/providers/paymentProvider.js +11 -7
- package/dist/cjs/providers/paymentProvider.js.map +1 -1
- package/dist/cjs/providers/types.d.ts +5 -4
- package/dist/cjs/queries/getPaymentPageDetails.js +1 -1
- package/dist/cjs/queries/getPaymentPageDetails.js.map +1 -1
- package/dist/cjs/queries/index.d.ts +8 -9
- package/dist/cjs/queries/index.js +8 -9
- package/dist/cjs/queries/index.js.map +1 -1
- package/dist/esm/Components/Sections/Form/Payment/Zuora/Zuora.d.ts +4 -0
- package/dist/esm/Components/Sections/Form/Payment/Zuora/Zuora.js +234 -0
- package/dist/esm/Components/Sections/Form/Payment/Zuora/Zuora.js.map +1 -0
- package/dist/esm/Components/Sections/Form/Payment/Zuora/index.d.ts +2 -7
- package/dist/esm/Components/Sections/Form/Payment/Zuora/index.js +2 -217
- package/dist/esm/Components/Sections/Form/Payment/Zuora/index.js.map +1 -1
- package/dist/esm/Components/Sections/Form/Payment/Zuora/styled.d.ts +13 -0
- package/dist/esm/Components/Sections/Form/Payment/Zuora/styled.js +13 -0
- package/dist/esm/Components/Sections/Form/Payment/Zuora/styled.js.map +1 -0
- package/dist/esm/Components/Sections/Form/Payment/Zuora/types.d.ts +5 -4
- package/dist/esm/Components/Sections/Form/Payment/index.d.ts +2 -2
- package/dist/esm/Components/Sections/Form/Payment/index.js.map +1 -1
- package/dist/esm/Components/Sections/Form/Phone/Phone.js +1 -1
- package/dist/esm/Components/Sections/Form/Phone/{styles.js → styled.js} +1 -1
- package/dist/esm/Components/Sections/Form/Phone/{styles.js.map → styled.js.map} +1 -1
- package/dist/esm/Components/Templates/PaymentRender.js.map +1 -1
- package/dist/esm/context/types.d.ts +3 -3
- package/dist/esm/helpers/apiHandlerUtils.js +1 -1
- package/dist/esm/helpers/apiHandlerUtils.js.map +1 -1
- package/dist/esm/pages/Payment/Payment.js +2 -2
- package/dist/esm/pages/Payment/Payment.js.map +1 -1
- package/dist/esm/pages/types.d.ts +3 -3
- package/dist/esm/providers/paymentProvider.js +11 -7
- package/dist/esm/providers/paymentProvider.js.map +1 -1
- package/dist/esm/providers/types.d.ts +5 -4
- package/dist/esm/queries/getPaymentPageDetails.js +1 -1
- package/dist/esm/queries/getPaymentPageDetails.js.map +1 -1
- package/dist/esm/queries/index.d.ts +8 -9
- package/dist/esm/queries/index.js +8 -9
- package/dist/esm/queries/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/queries/updateUser.d.ts +0 -1
- package/dist/cjs/queries/updateUser.js +0 -11
- package/dist/cjs/queries/updateUser.js.map +0 -1
- package/dist/esm/queries/updateUser.d.ts +0 -1
- package/dist/esm/queries/updateUser.js +0 -8
- package/dist/esm/queries/updateUser.js.map +0 -1
- /package/dist/cjs/Components/Sections/Form/Phone/{styles.d.ts → styled.d.ts} +0 -0
- /package/dist/esm/Components/Sections/Form/Phone/{styles.d.ts → styled.d.ts} +0 -0
|
@@ -1,219 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return cooked;
|
|
4
|
-
};
|
|
5
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
6
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
8
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
9
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
10
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
11
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
15
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
16
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
17
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
18
|
-
function step(op) {
|
|
19
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
20
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
21
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
22
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
23
|
-
switch (op[0]) {
|
|
24
|
-
case 0: case 1: t = op; break;
|
|
25
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
26
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
27
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
28
|
-
default:
|
|
29
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
30
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
31
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
32
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
33
|
-
if (t[2]) _.ops.pop();
|
|
34
|
-
_.trys.pop(); continue;
|
|
35
|
-
}
|
|
36
|
-
op = body.call(thisArg, _);
|
|
37
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
38
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
import { useAccountContext, } from '../../../../../context';
|
|
42
|
-
import React, { useEffect, useRef, useState } from 'react';
|
|
43
|
-
import { useRouter } from 'next/router';
|
|
44
|
-
import onFormSubmit from '../../onFormSubmit';
|
|
45
|
-
import { GridLayout, getMediaQueryFromTheme, getStylePresetFromTheme, styled, } from 'newskit';
|
|
46
|
-
import { BackButton } from '@newskit-render/shared-components';
|
|
47
|
-
import { ContextName } from '../../../../../context/types';
|
|
48
|
-
import { getPaymentContextName } from '../../../../../helpers/paymentUtils';
|
|
49
|
-
import { replaceBaseURL } from '../../../../../helpers/dataUtils';
|
|
50
|
-
export var addZuoraScript = function (onLoadCallback) {
|
|
51
|
-
var script = document.createElement('script');
|
|
52
|
-
script.src =
|
|
53
|
-
'https://static.zuora.com/Resources/libs/hosted/1.3.1/zuora-min.js';
|
|
54
|
-
script.async = true;
|
|
55
|
-
script.onload = function () { return onLoadCallback(); };
|
|
56
|
-
document.body.appendChild(script);
|
|
57
|
-
};
|
|
58
|
-
var StyledDiv = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n iframe#z_hppm_iframe {\n background: none;\n border: none;\n width: 100%;\n }\n"], ["\n iframe#z_hppm_iframe {\n background: none;\n border: none;\n width: 100%;\n }\n"])));
|
|
59
|
-
var StyledBackButton = styled(BackButton)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: 48px; /* same value hardcoded in the hosted page */\n display: flex;\n justify-content: center;\n align-items: center;\n\n & > a {\n align-self: stretch;\n display: flex;\n justify-content: center;\n flex-basis: 100%;\n text-decoration: none;\n ", "\n border-radius: none;\n }\n\n & > a:hover {\n border-radius: none;\n }\n\n ", " {\n justify-self: end;\n width: 98px; /* same value hardcoded in the hosted page */\n margin-right: calc(98px + 16px);\n margin-top: -48px;\n }\n"], ["\n height: 48px; /* same value hardcoded in the hosted page */\n display: flex;\n justify-content: center;\n align-items: center;\n\n & > a {\n align-self: stretch;\n display: flex;\n justify-content: center;\n flex-basis: 100%;\n text-decoration: none;\n ", "\n border-radius: none;\n }\n\n & > a:hover {\n border-radius: none;\n }\n\n ", " {\n justify-self: end;\n width: 98px; /* same value hardcoded in the hosted page */\n margin-right: calc(98px + 16px);\n margin-top: -48px;\n }\n"])), function (_a) {
|
|
60
|
-
var overrides = _a.overrides;
|
|
61
|
-
return (overrides === null || overrides === void 0 ? void 0 : overrides.stylePreset) && getStylePresetFromTheme(overrides === null || overrides === void 0 ? void 0 : overrides.stylePreset);
|
|
62
|
-
}, getMediaQueryFromTheme('lg'));
|
|
63
|
-
var Zuora = function (_a) {
|
|
64
|
-
var _b;
|
|
65
|
-
var paymentMethod = _a.paymentMethod;
|
|
66
|
-
var _c = useAccountContext(ContextName[getPaymentContextName(paymentMethod)]), cancelButton = _c.cancelButton, paymentData = _c.paymentData, handleLoading = _c.handleLoading, handleError = _c.handleError, handleSuccess = _c.handleSuccess, baseUrl = _c.baseUrl, errorMessages = _c.errorMessages, genericErrorMessage = _c.genericErrorMessage, zuoraCustomErrorMessages = _c.zuoraCustomErrorMessages;
|
|
67
|
-
if (!paymentData) {
|
|
68
|
-
return null;
|
|
69
|
-
}
|
|
70
|
-
var _d = paymentData, signature = _d.signature, token = _d.token, tenantId = _d.tenantId, key = _d.key, pageId = _d.pageId, url = _d.url, timestamp = _d.timestamp;
|
|
71
|
-
var _e = zuoraCustomErrorMessages, creditCardHolderName = _e.creditCardHolderName, creditCardNumber = _e.creditCardNumber, cardSecurityCode = _e.cardSecurityCode, creditCardExpiration = _e.creditCardExpiration, creditCardPostalCode = _e.creditCardPostalCode, creditCardCountry = _e.creditCardCountry, unknownError = _e.unknownError;
|
|
72
|
-
var router = useRouter();
|
|
73
|
-
var iframeContainerRef = useRef(null);
|
|
74
|
-
var _f = useState(false), isIFrameLoaded = _f[0], setIsIFrameLoaded = _f[1];
|
|
75
|
-
var hasCancelButton = cancelButton && cancelButton.text;
|
|
76
|
-
var hostedPageCallback = function (response) { return __awaiter(void 0, void 0, void 0, function () {
|
|
77
|
-
var refId, signature_1, token_1, mutationObject;
|
|
78
|
-
return __generator(this, function (_a) {
|
|
79
|
-
switch (_a.label) {
|
|
80
|
-
case 0:
|
|
81
|
-
if (!response.success) return [3 /*break*/, 2];
|
|
82
|
-
if (handleLoading)
|
|
83
|
-
handleLoading('pending', errorMessages, genericErrorMessage, undefined, 60000);
|
|
84
|
-
refId = response.refId, signature_1 = response.signature, token_1 = response.token;
|
|
85
|
-
mutationObject = {
|
|
86
|
-
refId: refId,
|
|
87
|
-
responseSignature: signature_1,
|
|
88
|
-
token: token_1,
|
|
89
|
-
id: pageId,
|
|
90
|
-
timestamp: timestamp,
|
|
91
|
-
tenantId: tenantId,
|
|
92
|
-
};
|
|
93
|
-
return [4 /*yield*/, onFormSubmit(mutationObject, 'zuoraPaymentMethod', router, function () {
|
|
94
|
-
if (handleError)
|
|
95
|
-
handleError('error', errorMessages, genericErrorMessage);
|
|
96
|
-
}, handleSuccess, "".concat(baseUrl, "/subscription-and-billing"))];
|
|
97
|
-
case 1:
|
|
98
|
-
_a.sent();
|
|
99
|
-
return [3 /*break*/, 3];
|
|
100
|
-
case 2:
|
|
101
|
-
if (!response.success) {
|
|
102
|
-
handleError && handleError('paymentFailure', errorMessages);
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
handleError && handleError('payment', errorMessages);
|
|
106
|
-
}
|
|
107
|
-
_a.label = 3;
|
|
108
|
-
case 3: return [2 /*return*/];
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
}); };
|
|
112
|
-
var errorMessageCallback = function (key, code, message, rawGatewayInfo) {
|
|
113
|
-
var errorMessage = message;
|
|
114
|
-
if (key != 'error') {
|
|
115
|
-
switch (key) {
|
|
116
|
-
case 'creditCardHolderName':
|
|
117
|
-
if (code == '001') {
|
|
118
|
-
errorMessage = creditCardHolderName;
|
|
119
|
-
}
|
|
120
|
-
break;
|
|
121
|
-
case 'creditCardNumber':
|
|
122
|
-
if (code == '001') {
|
|
123
|
-
errorMessage = creditCardNumber.one;
|
|
124
|
-
}
|
|
125
|
-
if (code == '002') {
|
|
126
|
-
errorMessage = creditCardNumber.two;
|
|
127
|
-
}
|
|
128
|
-
if (code == '003') {
|
|
129
|
-
errorMessage = creditCardNumber.three;
|
|
130
|
-
}
|
|
131
|
-
break;
|
|
132
|
-
case 'cardSecurityCode':
|
|
133
|
-
if (code == '001') {
|
|
134
|
-
errorMessage = cardSecurityCode.one;
|
|
135
|
-
}
|
|
136
|
-
if (code == '004') {
|
|
137
|
-
errorMessage = cardSecurityCode.four;
|
|
138
|
-
}
|
|
139
|
-
break;
|
|
140
|
-
case 'creditCardExpirationYear':
|
|
141
|
-
case 'creditCardExpirationMonth':
|
|
142
|
-
if (code == '001') {
|
|
143
|
-
errorMessage = creditCardExpiration;
|
|
144
|
-
}
|
|
145
|
-
break;
|
|
146
|
-
case 'creditCardPostalCode':
|
|
147
|
-
if (code == '001') {
|
|
148
|
-
errorMessage = creditCardPostalCode;
|
|
149
|
-
}
|
|
150
|
-
break;
|
|
151
|
-
case 'creditCardCountry':
|
|
152
|
-
if (code == '001') {
|
|
153
|
-
errorMessage = creditCardCountry;
|
|
154
|
-
}
|
|
155
|
-
break;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
else {
|
|
159
|
-
if (code == 'unknown' && rawGatewayInfo) {
|
|
160
|
-
// customize error message based on the rawGatewayInfo
|
|
161
|
-
errorMessage = "".concat(rawGatewayInfo.responseCode, ": ").concat(rawGatewayInfo.responseMessage);
|
|
162
|
-
}
|
|
163
|
-
else {
|
|
164
|
-
errorMessage = unknownError;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
168
|
-
var anyWindow = window;
|
|
169
|
-
anyWindow.Z.sendErrorMessageToHpm(key, errorMessage);
|
|
170
|
-
};
|
|
171
|
-
var loadHostedPage = function () {
|
|
172
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
173
|
-
var anyWindow = window;
|
|
174
|
-
anyWindow.Z.renderWithErrorHandler({
|
|
175
|
-
tenantId: tenantId,
|
|
176
|
-
token: token,
|
|
177
|
-
signature: signature,
|
|
178
|
-
key: key,
|
|
179
|
-
style: 'inline',
|
|
180
|
-
submitEnabled: 'true',
|
|
181
|
-
url: url,
|
|
182
|
-
id: pageId,
|
|
183
|
-
}, {
|
|
184
|
-
creditCardCountry: 'GBR',
|
|
185
|
-
}, hostedPageCallback, errorMessageCallback);
|
|
186
|
-
anyWindow.Z.setEventHandler('onloadCallback', function () {
|
|
187
|
-
setIsIFrameLoaded(true);
|
|
188
|
-
});
|
|
189
|
-
};
|
|
190
|
-
useEffect(function () {
|
|
191
|
-
if (typeof window !== 'undefined') {
|
|
192
|
-
addZuoraScript(loadHostedPage);
|
|
193
|
-
}
|
|
194
|
-
}, []);
|
|
195
|
-
return (React.createElement(GridLayout, { rows: '1fr auto', rowGap: { xs: 'space040', lg: 'space000' }, overrides: {
|
|
196
|
-
marginBlockEnd: {
|
|
197
|
-
xs: 'space070',
|
|
198
|
-
md: 'space080',
|
|
199
|
-
lg: 'space090', //64px
|
|
200
|
-
},
|
|
201
|
-
} },
|
|
202
|
-
React.createElement(StyledDiv, { id: "zuora_payment", ref: iframeContainerRef }),
|
|
203
|
-
hasCancelButton && isIFrameLoaded && (React.createElement(StyledBackButton, { backButton: {
|
|
204
|
-
text: cancelButton === null || cancelButton === void 0 ? void 0 : cancelButton.text,
|
|
205
|
-
href: replaceBaseURL(baseUrl, cancelButton === null || cancelButton === void 0 ? void 0 : cancelButton.href),
|
|
206
|
-
'aria-label': cancelButton === null || cancelButton === void 0 ? void 0 : cancelButton['aria-label'],
|
|
207
|
-
}, backButtonOverrides: {
|
|
208
|
-
asLink: true,
|
|
209
|
-
iconSize: 'iconSize000',
|
|
210
|
-
typographyPreset: 'utilityButton020',
|
|
211
|
-
}, overrides: {
|
|
212
|
-
//In Figma the Cancel button is an actually button with buttonMinimalSecondary preset
|
|
213
|
-
//In code Cancel is a LinkStandalone component which does not support button style presets
|
|
214
|
-
stylePreset: (_b = cancelButton === null || cancelButton === void 0 ? void 0 : cancelButton.overrides) === null || _b === void 0 ? void 0 : _b.stylePreset,
|
|
215
|
-
} }))));
|
|
216
|
-
};
|
|
1
|
+
import { Zuora } from './Zuora';
|
|
2
|
+
export * from './types';
|
|
217
3
|
export default Zuora;
|
|
218
|
-
var templateObject_1, templateObject_2;
|
|
219
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/Components/Sections/Form/Payment/Zuora/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/Components/Sections/Form/Payment/Zuora/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,cAAc,SAAS,CAAA;AACvB,eAAe,KAAK,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MQ } from 'newskit';
|
|
3
|
+
export declare const StyledIframeContainer: import("@emotion/styled").StyledComponent<{
|
|
4
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
+
as?: import("react").ElementType<any> | undefined;
|
|
6
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
7
|
+
export declare const StyledBackButton: import("@emotion/styled").StyledComponent<import("@newskit-render/shared-components").BackButtonProps & {
|
|
8
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
9
|
+
} & {
|
|
10
|
+
overrides?: {
|
|
11
|
+
stylePreset?: MQ<string> | undefined;
|
|
12
|
+
} | undefined;
|
|
13
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import { getMediaQueryFromTheme, getStylePresetFromTheme, styled, } from 'newskit';
|
|
6
|
+
import { BackButton } from '@newskit-render/shared-components';
|
|
7
|
+
export var StyledIframeContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n iframe#z_hppm_iframe {\n background: none;\n border: none;\n width: 100%;\n }\n"], ["\n iframe#z_hppm_iframe {\n background: none;\n border: none;\n width: 100%;\n }\n"])));
|
|
8
|
+
export var StyledBackButton = styled(BackButton)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: 48px; /* same value hardcoded in the hosted page */\n display: flex;\n justify-content: center;\n align-items: center;\n\n & > a {\n align-self: stretch;\n display: flex;\n justify-content: center;\n flex-basis: 100%;\n text-decoration: none;\n ", "\n border-radius: none;\n }\n\n & > a:hover {\n border-radius: none;\n }\n\n ", " {\n justify-self: end;\n width: 98px; /* same value hardcoded in the hosted page */\n margin-right: calc(98px + 16px);\n margin-top: -48px;\n }\n"], ["\n height: 48px; /* same value hardcoded in the hosted page */\n display: flex;\n justify-content: center;\n align-items: center;\n\n & > a {\n align-self: stretch;\n display: flex;\n justify-content: center;\n flex-basis: 100%;\n text-decoration: none;\n ", "\n border-radius: none;\n }\n\n & > a:hover {\n border-radius: none;\n }\n\n ", " {\n justify-self: end;\n width: 98px; /* same value hardcoded in the hosted page */\n margin-right: calc(98px + 16px);\n margin-top: -48px;\n }\n"])), function (_a) {
|
|
9
|
+
var overrides = _a.overrides;
|
|
10
|
+
return (overrides === null || overrides === void 0 ? void 0 : overrides.stylePreset) && getStylePresetFromTheme(overrides === null || overrides === void 0 ? void 0 : overrides.stylePreset);
|
|
11
|
+
}, getMediaQueryFromTheme('lg'));
|
|
12
|
+
var templateObject_1, templateObject_2;
|
|
13
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","sourceRoot":"","sources":["../../../../../../../src/Components/Sections/Form/Payment/Zuora/styled.tsx"],"names":[],"mappings":";;;;AAAA,OAAO,EAEL,sBAAsB,EACtB,uBAAuB,EACvB,MAAM,GACP,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAE9D,MAAM,CAAC,IAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,kKAAA,+FAM9C,IAAA,CAAA;AAED,MAAM,CAAC,IAAM,gBAAgB,GAAG,MAAM,CAAC,UAAU,CAAC,0lBAEhD,yRAYI,EACyE,yFAQ3E,EAA4B,iKAM/B,KAfK,UAAC,EAAa;QAAX,SAAS,eAAA;IACZ,OAAA,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,WAAW,KAAI,uBAAuB,CAAC,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,WAAW,CAAC;AAAzE,CAAyE,EAQ3E,sBAAsB,CAAC,IAAI,CAAC,CAM/B,CAAA"}
|
|
@@ -14,12 +14,13 @@ export interface ZuoraCustomErrorMessages {
|
|
|
14
14
|
creditCardCountry: string;
|
|
15
15
|
unknownError: string;
|
|
16
16
|
}
|
|
17
|
-
export interface
|
|
17
|
+
export interface ZuoraPaymentPageData {
|
|
18
|
+
pageId: string;
|
|
19
|
+
mandateId: string | null;
|
|
18
20
|
signature: string;
|
|
21
|
+
key: string;
|
|
19
22
|
token: string;
|
|
20
23
|
tenantId: number;
|
|
21
|
-
key: string;
|
|
22
|
-
pageId: string;
|
|
23
|
-
url: string;
|
|
24
24
|
timestamp: number;
|
|
25
|
+
url: string;
|
|
25
26
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import Stripe from './Stripe';
|
|
2
|
-
import Zuora, {
|
|
2
|
+
import Zuora, { ZuoraPaymentPageData, ZuoraCustomErrorMessages } from './Zuora';
|
|
3
3
|
import { PaymentProvider } from './types';
|
|
4
|
-
export { Stripe, Zuora,
|
|
4
|
+
export { Stripe, Zuora, ZuoraPaymentPageData, ZuoraCustomErrorMessages, PaymentProvider, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/Components/Sections/Form/Payment/index.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAA;AAC7B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/Components/Sections/Form/Payment/index.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAA;AAC7B,OAAO,KAAyD,MAAM,SAAS,CAAA;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAEzC,OAAO,EACL,MAAM,EACN,KAAK,EAGL,eAAe,GAChB,CAAA"}
|
|
@@ -58,7 +58,7 @@ import onSubmit from '../onFormSubmit';
|
|
|
58
58
|
import PhoneInput from 'react-phone-number-input/max';
|
|
59
59
|
import { parsePhoneNumber } from 'react-phone-number-input';
|
|
60
60
|
import { ContextName } from '../../../../context/types';
|
|
61
|
-
import { phoneInputCSS, styledInputs, InputIconContainerBlock, IconContainer, AssistiveTextWrapper, } from './
|
|
61
|
+
import { phoneInputCSS, styledInputs, InputIconContainerBlock, IconContainer, AssistiveTextWrapper, } from './styled';
|
|
62
62
|
import { Error as FilledError } from '@emotion-icons/material/Error';
|
|
63
63
|
import { CheckCircle as FilledCheckCircle } from '@emotion-icons/material/CheckCircle';
|
|
64
64
|
import unescape from 'lodash.unescape';
|
|
@@ -10,4 +10,4 @@ export var InputIconContainerBlock = styled(Block)(templateObject_2 || (template
|
|
|
10
10
|
export var IconContainer = styled.span(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n right: 10px;\n top: 37px;\n transform: translate(0, -90%);\n"], ["\n position: absolute;\n right: 10px;\n top: 37px;\n transform: translate(0, -90%);\n"])));
|
|
11
11
|
export var AssistiveTextWrapper = styled(Block)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n position: absolute;\n"], ["\n position: absolute;\n"])));
|
|
12
12
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
13
|
-
//# sourceMappingURL=
|
|
13
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"styled.js","sourceRoot":"","sources":["../../../../../../src/Components/Sections/Form/Phone/styled.tsx"],"names":[],"mappings":";;;;AAAA,OAAO,EACL,KAAK,EACL,sBAAsB,EACtB,sBAAsB,EACtB,MAAM,GACP,MAAM,SAAS,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,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,WAAW,GACZ,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,cAAc,EACd,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,aAAa,CAAA;AAGpB,MAAM,CAAC,IAAM,YAAY,GAAG;IAC1B,MAAM,QAAA;IACN,KAAK,OAAA;CACN,CAAA;AACD,MAAM,CAAC,IAAM,iBAAiB,GAAsB;IAClD,aAAa,EAAE;QACb,eAAe,EAAE,eAAe,CAAC,KAAK;QACtC,MAAM,EAAE,qBAAqB;QAC7B,GAAG,EAAE,wBAAwB;QAC7B,OAAO,EAAE,WAAW,CAAC,aAAa,CAAC;KACpC;IACD,cAAc,EAAE;QACd,eAAe,EAAE,eAAe,CAAC,KAAK;QACtC,MAAM,EAAE,sBAAsB;QAC9B,GAAG,EAAE,yBAAyB;QAC9B,OAAO,EAAE,WAAW,CAAC,cAAc,CAAC;KACrC;IACD,OAAO,EAAE;QACP,eAAe,EAAE,eAAe,CAAC,KAAK;QACtC,MAAM,EAAE,WAAW;QACnB,GAAG,EAAE,cAAc;QACnB,OAAO,EAAE,WAAW,CAAC,OAAO;KAC7B;IACD,MAAM,EAAE;QACN,eAAe,EAAE,eAAe,CAAC,KAAK;QACtC,MAAM,EAAE,WAAW;QACnB,GAAG,EAAE,cAAc;QACnB,OAAO,EAAE,WAAW,CAAC,OAAO;KAC7B;CACF,CAAA;
|
|
1
|
+
{"version":3,"file":"PaymentRender.js","sourceRoot":"","sources":["../../../../src/Components/Templates/PaymentRender.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACvC,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,C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AAA;AACH,CAAC,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -5,7 +5,7 @@ import { As, ListItemType, ListCellProps, ListItemProps, RequestHeaders, PastDue
|
|
|
5
5
|
import { MQ, InlineMessageProps, NewsKitIcon, InstrumentationEvent } from 'newskit';
|
|
6
6
|
import { HeadProps } from '../Components/Elements/Head';
|
|
7
7
|
import { UserData, Data } from '../pages/types';
|
|
8
|
-
import { PaymentProvider, ZuoraCustomErrorMessages,
|
|
8
|
+
import { PaymentProvider, ZuoraCustomErrorMessages, ZuoraPaymentPageData } from '../Components/Sections/Form/Payment';
|
|
9
9
|
import { MessageMap, GenericMessageMap } from '../Components/Elements/Toast';
|
|
10
10
|
import { CommentingNotificationsProps } from '../Components/Sections/Form/CommentingNotifications';
|
|
11
11
|
import { CancellationReasonProps } from '../Components/Sections/Form/CancellationReason';
|
|
@@ -245,12 +245,12 @@ export interface AccountLandingPageContextOptions extends NonInteractiveContextO
|
|
|
245
245
|
}
|
|
246
246
|
export interface PaymentPageContextOptions extends BaseContextOptionsWithUserData {
|
|
247
247
|
buttonGroupProps: Partial<ButtonGroupProps>;
|
|
248
|
-
paymentData: ZuoraPaymentData;
|
|
249
248
|
zuoraCustomErrorMessages: ZuoraCustomErrorMessages;
|
|
249
|
+
paymentPageData: ZuoraPaymentPageData;
|
|
250
250
|
paymentProvider: PaymentProvider;
|
|
251
|
+
paymentType?: string;
|
|
251
252
|
infoPanel: InfoPanel;
|
|
252
253
|
cancelButton?: ButtonProps;
|
|
253
|
-
paymentType?: string;
|
|
254
254
|
tealiumContext?: TealiumEventContext;
|
|
255
255
|
}
|
|
256
256
|
export interface SubscriptionAndBillingContextOptions extends AccountLandingPageContextOptions {
|
|
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import {
|
|
12
|
+
import { mutateCancellation, mutateDeleteHolidayStop, mutateDeliveryInstructions, mutateCreateHolidayStop, mutateUpdateHolidayStop, mutateOrderVoucherBooklet, mutateStripePaymentMethod, mutateZuoraPaymentMethod, mutateSubscribeForNewsletter, mutateUnsubscribeForNewsletter, mutateUpdateCommentingUser, mutateUser, } from './../queries';
|
|
13
13
|
var mutationsMap = {
|
|
14
14
|
name: mutateUser,
|
|
15
15
|
phoneNumber: mutateUser,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiHandlerUtils.js","sourceRoot":"","sources":["../../../src/helpers/apiHandlerUtils.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"apiHandlerUtils.js","sourceRoot":"","sources":["../../../src/helpers/apiHandlerUtils.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,0BAA0B,EAC1B,uBAAuB,EACvB,uBAAuB,EACvB,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,EACxB,4BAA4B,EAC5B,8BAA8B,EAC9B,0BAA0B,EAC1B,UAAU,GACX,MAAM,cAAc,CAAA;AAErB,IAAM,YAAY,GAAG;IACnB,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,UAAU;IACvB,MAAM,EAAE,UAAU;IAClB,eAAe,EAAE,yBAAyB;IAC1C,kBAAkB,EAAE,wBAAwB;IAC5C,KAAK,EAAE,UAAU;IACjB,OAAO,EAAE,UAAU;IACnB,mBAAmB,EAAE,kBAAkB;IACvC,uBAAuB,EAAE,0BAA0B;IACnD,qBAAqB,EAAE,uBAAuB;IAC9C,qBAAqB,EAAE,uBAAuB;IAC9C,qBAAqB,EAAE,uBAAuB;IAC9C,QAAQ,EAAE,yBAAyB;IACnC,WAAW,EAAE,0BAA0B;IACvC,0BAA0B,EAAE,0BAA0B;IACtD,sBAAsB,EAAE,4BAA4B;IACpD,wBAAwB,EAAE,8BAA8B;CACzD,CAAA;AAED,MAAM,CAAC,IAAM,oBAA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,WAAW,GAAG,UAAC,GAAW;IACrC,OAAO,YAAY,CAAC,GAAG,CAAC,CAAA;AAC1B,CAAC,CAAA"}
|
|
@@ -14,9 +14,9 @@ import assign from 'lodash.assign';
|
|
|
14
14
|
import Layout, { PaymentRender, paymentMethodsMap, } from '../../Components/Templates';
|
|
15
15
|
import { handleError, handleLoading, handleSuccess, } from '../../helpers/toastFunctions';
|
|
16
16
|
export var Payment = function (_a) {
|
|
17
|
-
var
|
|
17
|
+
var customTheme = _a.customTheme, themeDropdownObject = _a.themeDropdownObject, context = _a.context, validation = _a.validation, env = _a.env, user = _a.user, _b = _a.footer, footer = _b === void 0 ? false : _b, requestHeaders = _a.requestHeaders, paymentPageData = _a.paymentPageData, paymentProvider = _a.paymentProvider, paymentType = _a.paymentType;
|
|
18
18
|
var _c = paymentMethodsMap[paymentType], ctx = _c.ctx, ctxName = _c.ctxName;
|
|
19
|
-
var enhancedContext = __assign(__assign({}, assign({}, ctx, context)), {
|
|
19
|
+
var enhancedContext = __assign(__assign({}, assign({}, ctx, context)), { validation: validation, env: env, userData: user, handleError: handleError, handleLoading: handleLoading, handleSuccess: handleSuccess, requestHeaders: requestHeaders, paymentPageData: paymentPageData, paymentProvider: paymentProvider, paymentType: paymentType });
|
|
20
20
|
return (React.createElement(Layout, { context: enhancedContext, customTheme: customTheme, themeDropdownObject: themeDropdownObject, contextName: ctxName, footer: footer },
|
|
21
21
|
React.createElement(PaymentRender, { paymentMethod: paymentType })));
|
|
22
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Payment.js","sourceRoot":"","sources":["../../../../src/pages/Payment/Payment.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,MAAM,MAAM,eAAe,CAAA;AAClC,OAAO,MAAM,EAAE,EACb,aAAa,EACb,iBAAiB,GAClB,MAAM,4BAA4B,CAAA;AAInC,OAAO,EACL,WAAW,EACX,aAAa,EACb,aAAa,GACd,MAAM,8BAA8B,CAAA;AAErC,MAAM,CAAC,IAAM,OAAO,GAA2B,UAAC,EAY/C;QAXC,WAAW,iBAAA,EACX,
|
|
1
|
+
{"version":3,"file":"Payment.js","sourceRoot":"","sources":["../../../../src/pages/Payment/Payment.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,MAAM,MAAM,eAAe,CAAA;AAClC,OAAO,MAAM,EAAE,EACb,aAAa,EACb,iBAAiB,GAClB,MAAM,4BAA4B,CAAA;AAInC,OAAO,EACL,WAAW,EACX,aAAa,EACb,aAAa,GACd,MAAM,8BAA8B,CAAA;AAErC,MAAM,CAAC,IAAM,OAAO,GAA2B,UAAC,EAY/C;QAXC,WAAW,iBAAA,EACX,mBAAmB,yBAAA,EACnB,OAAO,aAAA,EACP,UAAU,gBAAA,EACV,GAAG,SAAA,EACH,IAAI,UAAA,EACJ,cAAc,EAAd,MAAM,mBAAG,KAAK,KAAA,EACd,cAAc,oBAAA,EACd,eAAe,qBAAA,EACf,eAAe,qBAAA,EACf,WAAW,iBAAA;IAEL,IAAA,KAAmB,iBAAiB,CAAC,WAAW,CAAC,EAA/C,GAAG,SAAA,EAAE,OAAO,aAAmC,CAAA;IAEvD,IAAM,eAAe,yBAChB,MAAM,CAAC,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,KAC3B,UAAU,YAAA,EACV,GAAG,KAAA,EACH,QAAQ,EAAE,IAAI,EACd,WAAW,aAAA,EACX,aAAa,eAAA,EACb,aAAa,eAAA,EACb,cAAc,gBAAA,EACd,eAAe,iBAAA,EACf,eAAe,iBAAA,EACf,WAAW,aAAA,GACZ,CAAA;IAED,OAAO,CACL,oBAAC,MAAM,IACL,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,WAAW,EACxB,mBAAmB,EAAE,mBAAmB,EACxC,WAAW,EAAE,OAAO,EACpB,MAAM,EAAE,MAAM;QAEd,oBAAC,aAAa,IAAC,aAAa,EAAE,WAAW,GAAI,CACtC,CACV,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MQ, UncompiledTheme } from 'newskit';
|
|
2
2
|
import { ContextOptions } from '../context';
|
|
3
|
-
import {
|
|
3
|
+
import { ZuoraPaymentPageData, PaymentProvider } from '../Components/Sections/Form/Payment';
|
|
4
4
|
import { ThemeDropdownObject, RequestHeaders } from '@newskit-render/shared-components';
|
|
5
5
|
import { Subscription } from '../Components/Sections/Form/Address/types';
|
|
6
6
|
export type AddressData = {
|
|
@@ -205,10 +205,10 @@ export interface AddFieldDataProps extends Data {
|
|
|
205
205
|
type: string;
|
|
206
206
|
}
|
|
207
207
|
export interface PaymentProps extends BasePagePropsWithValidation {
|
|
208
|
-
|
|
208
|
+
paymentPageData: ZuoraPaymentPageData;
|
|
209
209
|
paymentProvider: PaymentProvider;
|
|
210
|
-
user: PaymentUserData;
|
|
211
210
|
paymentType: string;
|
|
211
|
+
user: PaymentUserData;
|
|
212
212
|
}
|
|
213
213
|
export interface EditFieldProps extends BasePagePropsWithValidation {
|
|
214
214
|
data: EditFieldDataProps;
|
|
@@ -41,13 +41,16 @@ import { PaymentProvider } from '../Components/Sections/Form/Payment/types';
|
|
|
41
41
|
export var paymentProvider = function (_a) {
|
|
42
42
|
var context = _a.context, apolloClient = _a.apolloClient;
|
|
43
43
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
44
|
-
var resolvedUrl, splitUrl, paymentType, _b, pageId, paymentProvider, response, _c,
|
|
44
|
+
var resolvedUrl, splitUrl, paymentType, _b, pageId, paymentProvider, response, _c, id, mandateId, signature, signingKey, signingToken, tenantId, timestamp, error_1;
|
|
45
45
|
return __generator(this, function (_d) {
|
|
46
46
|
switch (_d.label) {
|
|
47
47
|
case 0:
|
|
48
48
|
resolvedUrl = context.resolvedUrl;
|
|
49
49
|
splitUrl = resolvedUrl.split('/');
|
|
50
50
|
paymentType = splitUrl[splitUrl.length - 1];
|
|
51
|
+
if (!paymentMethodsMap[paymentType]) {
|
|
52
|
+
return [2 /*return*/, {}];
|
|
53
|
+
}
|
|
51
54
|
_b = paymentMethodsMap[paymentType], pageId = _b.pageId, paymentProvider = _b.paymentProvider;
|
|
52
55
|
if (!(paymentProvider === 'Zuora')) return [3 /*break*/, 4];
|
|
53
56
|
_d.label = 1;
|
|
@@ -60,19 +63,20 @@ export var paymentProvider = function (_a) {
|
|
|
60
63
|
case 2:
|
|
61
64
|
response = _d.sent();
|
|
62
65
|
if (response && response.data && response.data.paymentPageDetails[0]) {
|
|
63
|
-
_c = response.data.paymentPageDetails[0],
|
|
66
|
+
_c = response.data.paymentPageDetails[0], id = _c.id, mandateId = _c.mandateId, signature = _c.signature, signingKey = _c.signingKey, signingToken = _c.signingToken, tenantId = _c.tenantId, timestamp = _c.timestamp;
|
|
64
67
|
return [2 /*return*/, {
|
|
65
|
-
|
|
68
|
+
paymentPageData: {
|
|
69
|
+
pageId: id,
|
|
70
|
+
mandateId: mandateId,
|
|
66
71
|
signature: signature,
|
|
72
|
+
key: signingKey,
|
|
67
73
|
token: signingToken,
|
|
68
74
|
tenantId: tenantId,
|
|
69
|
-
key: signingKey,
|
|
70
|
-
pageId: id,
|
|
71
75
|
timestamp: timestamp,
|
|
72
76
|
url: zuoraRsaSignatureUri,
|
|
73
77
|
},
|
|
74
|
-
paymentType: paymentType,
|
|
75
78
|
paymentProvider: PaymentProvider[paymentProvider],
|
|
79
|
+
paymentType: paymentType,
|
|
76
80
|
}];
|
|
77
81
|
}
|
|
78
82
|
return [3 /*break*/, 4];
|
|
@@ -81,8 +85,8 @@ export var paymentProvider = function (_a) {
|
|
|
81
85
|
console.error('ERROR with GET_PAYMENT_PAGE_DETAILS query', error_1);
|
|
82
86
|
return [3 /*break*/, 4];
|
|
83
87
|
case 4: return [2 /*return*/, {
|
|
84
|
-
paymentType: paymentType,
|
|
85
88
|
paymentProvider: PaymentProvider[paymentProvider],
|
|
89
|
+
paymentType: paymentType,
|
|
86
90
|
}];
|
|
87
91
|
}
|
|
88
92
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paymentProvider.js","sourceRoot":"","sources":["../../../src/providers/paymentProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AACrD,OAAO,EAAE,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAA;
|
|
1
|
+
{"version":3,"file":"paymentProvider.js","sourceRoot":"","sources":["../../../src/providers/paymentProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AACrD,OAAO,EAAE,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAA;AAE3E,MAAM,CAAC,IAAM,eAAe,GAAG,UAAO,EAGvB;QAFb,OAAO,aAAA,EACP,YAAY,kBAAA;;;;;;oBAEJ,WAAW,GAAK,OAAiC,YAAtC,CAAsC;oBACnD,QAAQ,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;oBACjC,WAAW,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;oBAEjD,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE;wBACnC,sBAAO,EAAE,EAAA;qBACV;oBACK,KAA8B,iBAAiB,CAAC,WAAW,CAAC,EAA1D,MAAM,YAAA,EAAE,eAAe,qBAAA,CAAmC;yBAE9D,CAAA,eAAe,KAAK,OAAO,CAAA,EAA3B,wBAA2B;;;;oBAEV,qBAAM,YAAY,CAAC,KAAK,CAAC;4BACxC,KAAK,EAAE,wBAAwB;4BAC/B,SAAS,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,QAAA,EAAE;yBACpC,CAAC,EAAA;;oBAHI,QAAQ,GAAG,SAGf;oBAEF,IAAI,QAAQ,IAAI,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE;wBAC9D,KAQF,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAPrC,EAAE,QAAA,EACF,SAAS,eAAA,EACT,SAAS,eAAA,EACT,UAAU,gBAAA,EACV,YAAY,kBAAA,EACZ,QAAQ,cAAA,EACR,SAAS,eAAA,CAC4B;wBAEvC,sBAAO;gCACL,eAAe,EAAE;oCACf,MAAM,EAAE,EAAE;oCACV,SAAS,WAAA;oCACT,SAAS,WAAA;oCACT,GAAG,EAAE,UAAU;oCACf,KAAK,EAAE,YAAY;oCACnB,QAAQ,UAAA;oCACR,SAAS,WAAA;oCACT,GAAG,EAAE,oBAAoB;iCAC1B;gCACD,eAAe,EAAE,eAAe,CAAC,eAAe,CAAC;gCACjD,WAAW,aAAA;6BACZ,EAAA;qBACF;;;;oBAED,OAAO,CAAC,KAAK,CAAC,2CAA2C,EAAE,OAAK,CAAC,CAAA;;wBAIrE,sBAAO;wBACL,eAAe,EAAE,eAAe,CAAC,eAAe,CAAC;wBACjD,WAAW,aAAA;qBACZ,EAAA;;;;CACF,CAAA"}
|
|
@@ -17,16 +17,17 @@ export interface MappedField {
|
|
|
17
17
|
field: string;
|
|
18
18
|
}
|
|
19
19
|
export interface PaymentProviderReturnObject {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
paymentPageData?: {
|
|
21
|
+
pageId: string;
|
|
22
|
+
mandateId: string | null;
|
|
22
23
|
signature: string;
|
|
24
|
+
key: string;
|
|
23
25
|
token: string;
|
|
24
26
|
tenantId: number;
|
|
25
|
-
key: string;
|
|
26
|
-
pageId: string;
|
|
27
27
|
timestamp: number;
|
|
28
28
|
url?: string;
|
|
29
29
|
};
|
|
30
|
+
paymentProvider?: PaymentProvider;
|
|
30
31
|
paymentType?: string;
|
|
31
32
|
}
|
|
32
33
|
interface AuthorizeUri {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { gql } from '@apollo/client';
|
|
2
|
-
export var GET_PAYMENT_PAGE_DETAILS = gql("\n query getPaymentPageDetails($title: String! $pageId: String!) {\n paymentPageDetails(title: $title pageId: $pageId) {\n id\n signature\n signingKey\n signingToken\n tenantId\n timestamp\n }\n }\n ");
|
|
2
|
+
export var GET_PAYMENT_PAGE_DETAILS = gql("\n query getPaymentPageDetails($title: String! $pageId: String!) {\n paymentPageDetails(title: $title pageId: $pageId) {\n id\n mandateId\n signature\n signingKey\n signingToken\n tenantId\n timestamp\n }\n }\n ");
|
|
3
3
|
//# sourceMappingURL=getPaymentPageDetails.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPaymentPageDetails.js","sourceRoot":"","sources":["../../../src/queries/getPaymentPageDetails.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAEpC,MAAM,CAAC,IAAM,wBAAwB,GAAG,GAAG,CACzC,
|
|
1
|
+
{"version":3,"file":"getPaymentPageDetails.js","sourceRoot":"","sources":["../../../src/queries/getPaymentPageDetails.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAEpC,MAAM,CAAC,IAAM,wBAAwB,GAAG,GAAG,CACzC,uRAYC,CACF,CAAA"}
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
export * from './getAuthorizeUriInput';
|
|
2
|
-
export * from './getEditField';
|
|
3
2
|
export * from './getDeliveryPostCode';
|
|
3
|
+
export * from './getEditField';
|
|
4
4
|
export * from './getOutstandingBalance';
|
|
5
|
-
export * from './getPaymentPageDetails';
|
|
6
5
|
export * from './getPaymentInfo';
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './getUserSubscription';
|
|
6
|
+
export * from './getPaymentPageDetails';
|
|
9
7
|
export * from './getUserHolidayStop';
|
|
10
8
|
export * from './getUserNewsletters';
|
|
11
|
-
export * from './
|
|
12
|
-
export * from './
|
|
9
|
+
export * from './getUserProfile';
|
|
10
|
+
export * from './getUserSubscription';
|
|
13
11
|
export * from './mutateCancellation';
|
|
14
|
-
export * from './
|
|
12
|
+
export * from './mutateDeleteHolidayStop';
|
|
15
13
|
export * from './mutateDeliveryInstructions';
|
|
16
14
|
export * from './mutateHolidayStop';
|
|
17
15
|
export * from './mutateOrderVoucherBooklet';
|
|
18
|
-
export * from './
|
|
19
|
-
export * from './mutateUpdateCommentingUser';
|
|
16
|
+
export * from './mutatePaymentMethod';
|
|
20
17
|
export * from './mutateSubscribeForNewsletter';
|
|
21
18
|
export * from './mutateUnsubscribeForNewsletter';
|
|
19
|
+
export * from './mutateUpdateCommentingUser';
|
|
20
|
+
export * from './mutateUser';
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
// GET
|
|
2
2
|
export * from './getAuthorizeUriInput';
|
|
3
|
-
export * from './getEditField';
|
|
4
3
|
export * from './getDeliveryPostCode';
|
|
4
|
+
export * from './getEditField';
|
|
5
5
|
export * from './getOutstandingBalance';
|
|
6
|
-
export * from './getPaymentPageDetails';
|
|
7
6
|
export * from './getPaymentInfo';
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './getUserSubscription';
|
|
7
|
+
export * from './getPaymentPageDetails';
|
|
10
8
|
export * from './getUserHolidayStop';
|
|
11
9
|
export * from './getUserNewsletters';
|
|
10
|
+
export * from './getUserProfile';
|
|
11
|
+
export * from './getUserSubscription';
|
|
12
12
|
// MUTATE
|
|
13
|
-
export * from './mutatePaymentMethod';
|
|
14
|
-
export * from './mutateUser';
|
|
15
13
|
export * from './mutateCancellation';
|
|
16
|
-
export * from './
|
|
14
|
+
export * from './mutateDeleteHolidayStop';
|
|
17
15
|
export * from './mutateDeliveryInstructions';
|
|
18
16
|
export * from './mutateHolidayStop';
|
|
19
17
|
export * from './mutateOrderVoucherBooklet';
|
|
20
|
-
export * from './
|
|
21
|
-
export * from './mutateUpdateCommentingUser';
|
|
18
|
+
export * from './mutatePaymentMethod';
|
|
22
19
|
export * from './mutateSubscribeForNewsletter';
|
|
23
20
|
export * from './mutateUnsubscribeForNewsletter';
|
|
21
|
+
export * from './mutateUpdateCommentingUser';
|
|
22
|
+
export * from './mutateUser';
|
|
24
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/queries/index.ts"],"names":[],"mappings":"AAAA,MAAM;AAEN,cAAc,wBAAwB,CAAA;AACtC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/queries/index.ts"],"names":[],"mappings":"AAAA,MAAM;AAEN,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA;AACrC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,yBAAyB,CAAA;AACvC,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA;AACvC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,uBAAuB,CAAA;AAErC,SAAS;AAET,cAAc,sBAAsB,CAAA;AACpC,cAAc,2BAA2B,CAAA;AACzC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,qBAAqB,CAAA;AACnC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,uBAAuB,CAAA;AACrC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,kCAAkC,CAAA;AAChD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,cAAc,CAAA"}
|