@funnelsgrove/payments 0.81.0 → 0.83.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/generated/package-version.d.ts +1 -1
- package/dist/generated/package-version.js +1 -1
- package/dist/providers/paypal/PayPalCheckout.js +2 -1
- package/dist/providers/solidgate/services/solidgate.service.js +1 -1
- package/dist/providers/solidgate/services/solidgateDeclineMessage.js +3 -2
- package/dist/providers/stripe/components/StripeWalletFirstCheckout.js +4 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PAYMENTS_PACKAGE_VERSION = "0.
|
|
1
|
+
export declare const PAYMENTS_PACKAGE_VERSION = "0.83.0";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by scripts/generate-package-version.mjs.
|
|
2
|
-
export const PAYMENTS_PACKAGE_VERSION = "0.
|
|
2
|
+
export const PAYMENTS_PACKAGE_VERSION = "0.83.0";
|
|
@@ -211,7 +211,8 @@ export function PayPalCheckout(props) {
|
|
|
211
211
|
}
|
|
212
212
|
approved = true;
|
|
213
213
|
persist();
|
|
214
|
-
|
|
214
|
+
// PayPal keeps its window open until onApprove settles; confirm behind our own status instead.
|
|
215
|
+
void verify();
|
|
215
216
|
},
|
|
216
217
|
onCancel: () => {
|
|
217
218
|
var _a, _b, _c;
|
|
@@ -195,7 +195,7 @@ const parseStatus = (value) => {
|
|
|
195
195
|
throw new Error('Solidgate checkout status returned an invalid retry delay');
|
|
196
196
|
}
|
|
197
197
|
return Object.assign({ attemptId: requiredString(value.attemptId, 'attemptId'), status: value.status, retryAfterMs }, (value.status === 'failed' && typeof value.failureCode === 'string'
|
|
198
|
-
&&
|
|
198
|
+
&& /^(?:\d\.\d{2}|risk_decline)$/.test(value.failureCode) ? { failureCode: value.failureCode } : {}));
|
|
199
199
|
};
|
|
200
200
|
export const prepareSolidgateCheckout = async (input) => {
|
|
201
201
|
var _a, _b;
|
|
@@ -25,9 +25,10 @@ const messages = {
|
|
|
25
25
|
};
|
|
26
26
|
export const solidgateDeclineMessage = (code) => ((code && Object.hasOwn(messages, code) ? messages[code] : undefined)
|
|
27
27
|
|| 'Your payment was declined. Use another payment method or contact your bank.');
|
|
28
|
-
// Issuer, card-data
|
|
28
|
+
// Issuer, card-data, bank-verification and risk refusals; other codes stay platform failures.
|
|
29
|
+
// `risk_decline` keeps the general message: the buyer is not told about anti-fraud.
|
|
29
30
|
const customerDeclineCodes = new Set([
|
|
30
|
-
'1.01', '2.04', '2.06', '2.08', '2.09', '2.15',
|
|
31
|
+
'risk_decline', '1.01', '2.04', '2.06', '2.08', '2.09', '2.15',
|
|
31
32
|
'3.01', '3.02', '3.03', '3.04', '3.05', '3.06', '3.07', '3.08', '3.09', '3.11', '3.12', '3.13',
|
|
32
33
|
'4.08', '5.01',
|
|
33
34
|
]);
|
|
@@ -398,7 +398,10 @@ function MethodForm({ blockId, checkoutAnalytics, checkoutSessionId, copy, count
|
|
|
398
398
|
}
|
|
399
399
|
if (result.type === 'error' && !isStripeCheckoutAlreadyPaidError(result.error)) {
|
|
400
400
|
const message = result.error.message || copy.paymentFailed;
|
|
401
|
-
|
|
401
|
+
const details = normalizeStripeCheckoutError(message, result.error, method);
|
|
402
|
+
// Stripe checks an incomplete form before charging and words that message in the visitor's language.
|
|
403
|
+
showError(message, !paymentElementComplete && details.category === 'platform_failure'
|
|
404
|
+
? Object.assign(Object.assign({}, details), { category: 'validation_failure' }) : details);
|
|
402
405
|
stopSubmitting();
|
|
403
406
|
return;
|
|
404
407
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funnelsgrove/payments",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.83.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/The-Solid-Grove/funnelsgrove.git",
|
|
@@ -64,11 +64,11 @@
|
|
|
64
64
|
"playwright": "1.58.2",
|
|
65
65
|
"typescript": "^5",
|
|
66
66
|
"vitest": "^3.2.4",
|
|
67
|
-
"@funnelsgrove/runtime": "0.
|
|
68
|
-
"@funnelsgrove/analytics": "0.
|
|
67
|
+
"@funnelsgrove/runtime": "0.51.0",
|
|
68
|
+
"@funnelsgrove/analytics": "0.34.0"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
|
-
"@funnelsgrove/runtime": "^0.
|
|
72
|
-
"@funnelsgrove/analytics": "^0.
|
|
71
|
+
"@funnelsgrove/runtime": "^0.51.0",
|
|
72
|
+
"@funnelsgrove/analytics": "^0.34.0"
|
|
73
73
|
}
|
|
74
74
|
}
|