@zendfi/sdk 0.7.0 → 0.7.2
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/index.js +5 -5
- package/dist/index.mjs +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3630,16 +3630,16 @@ var ZendFiEmbeddedCheckout = class {
|
|
|
3630
3630
|
/**
|
|
3631
3631
|
* Handle successful payment
|
|
3632
3632
|
*/
|
|
3633
|
-
handlePaymentSuccess(
|
|
3633
|
+
handlePaymentSuccess(statusData) {
|
|
3634
3634
|
if (this.pollInterval) {
|
|
3635
3635
|
clearInterval(this.pollInterval);
|
|
3636
3636
|
this.pollInterval = null;
|
|
3637
3637
|
}
|
|
3638
3638
|
this.config.onSuccess({
|
|
3639
|
-
paymentId:
|
|
3640
|
-
transactionSignature:
|
|
3641
|
-
amount:
|
|
3642
|
-
token:
|
|
3639
|
+
paymentId: this.checkoutData?.payment_id || statusData.payment_id,
|
|
3640
|
+
transactionSignature: statusData.transaction_signature || "Processing...",
|
|
3641
|
+
amount: this.checkoutData?.amount_usd || 0,
|
|
3642
|
+
token: this.checkoutData?.token || "USDC",
|
|
3643
3643
|
merchantName: this.checkoutData?.merchant_name || "Merchant"
|
|
3644
3644
|
});
|
|
3645
3645
|
this.renderSuccess();
|
package/dist/index.mjs
CHANGED
|
@@ -2574,16 +2574,16 @@ var ZendFiEmbeddedCheckout = class {
|
|
|
2574
2574
|
/**
|
|
2575
2575
|
* Handle successful payment
|
|
2576
2576
|
*/
|
|
2577
|
-
handlePaymentSuccess(
|
|
2577
|
+
handlePaymentSuccess(statusData) {
|
|
2578
2578
|
if (this.pollInterval) {
|
|
2579
2579
|
clearInterval(this.pollInterval);
|
|
2580
2580
|
this.pollInterval = null;
|
|
2581
2581
|
}
|
|
2582
2582
|
this.config.onSuccess({
|
|
2583
|
-
paymentId:
|
|
2584
|
-
transactionSignature:
|
|
2585
|
-
amount:
|
|
2586
|
-
token:
|
|
2583
|
+
paymentId: this.checkoutData?.payment_id || statusData.payment_id,
|
|
2584
|
+
transactionSignature: statusData.transaction_signature || "Processing...",
|
|
2585
|
+
amount: this.checkoutData?.amount_usd || 0,
|
|
2586
|
+
token: this.checkoutData?.token || "USDC",
|
|
2587
2587
|
merchantName: this.checkoutData?.merchant_name || "Merchant"
|
|
2588
2588
|
});
|
|
2589
2589
|
this.renderSuccess();
|