@funnelfox/billing 0.8.0-ffb-550.38 → 0.8.0-ffb-704.41
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/README.md +4 -0
- package/dist/chunk-index.cjs.js +879 -15
- package/dist/chunk-index.es.js +879 -16
- package/dist/chunk-stripe-card-form.cjs.js +1 -1
- package/dist/chunk-stripe-card-form.es.js +2 -2
- package/dist/chunk-stripe-wallet.cjs.js +1 -1
- package/dist/chunk-stripe-wallet.es.js +2 -2
- package/dist/funnelfox-billing.js +880 -17
- package/dist/funnelfox-billing.min.js +1 -1
- package/package.json +2 -2
- package/src/types.d.ts +151 -6
package/README.md
CHANGED
|
@@ -421,6 +421,8 @@ try {
|
|
|
421
421
|
console.log('Error Code:', error.errorCode); // e.g., 'double_purchase'
|
|
422
422
|
console.log('Error Type:', error.errorType); // e.g., 'api_exception'
|
|
423
423
|
console.log('Request ID:', error.requestId); // For support
|
|
424
|
+
console.log('Decline Code:', error.declineCode); // e.g., 'INSUFFICIENT_FUNDS', set on failed payments
|
|
425
|
+
console.log('Decline Source:', error.declineCodeSource); // 'primer' | 'stripe' | 'adyen', when the provider reports one
|
|
424
426
|
console.log('Message:', error.message);
|
|
425
427
|
} else if (error instanceof PrimerError) {
|
|
426
428
|
// Primer SDK error
|
|
@@ -634,6 +636,8 @@ const paymentMethod = await Billing.initMethod(
|
|
|
634
636
|
},
|
|
635
637
|
onPaymentFail: error => {
|
|
636
638
|
console.error('Payment failed:', error.message);
|
|
639
|
+
console.log('Decline code:', error.declineCode); // e.g., 'INSUFFICIENT_FUNDS', when the provider reports one
|
|
640
|
+
console.log('Decline source:', error.declineCodeSource); // 'primer' | 'stripe' | 'adyen'
|
|
637
641
|
},
|
|
638
642
|
onPaymentCancel: () => {
|
|
639
643
|
console.log('Payment was cancelled');
|