@paynext/sdk 0.0.46 → 0.0.47
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.d.ts +1 -1
- package/dist/index.es.js +4 -5
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -78,7 +78,7 @@ export declare enum CardType {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
export declare interface CheckoutConfig {
|
|
81
|
-
type: 'paypal' | 'apple-pay' | 'google-pay' | 'card' | '
|
|
81
|
+
type: 'paypal' | 'apple-pay' | 'google-pay' | 'card' | 'venmo';
|
|
82
82
|
order: number;
|
|
83
83
|
is_active: boolean;
|
|
84
84
|
}
|
package/dist/index.es.js
CHANGED
|
@@ -3827,7 +3827,6 @@ const Uc = (n, e, t) => e.concat(n.filter((r) => e.every((i) => !t(r, i)))), _n
|
|
|
3827
3827
|
token: (wr = (Ar = n.applePay) == null ? void 0 : Ar.networkToken) == null ? void 0 : wr.number,
|
|
3828
3828
|
token_service_provider: (Ir = (Tr = n.applePay) == null ? void 0 : Tr.networkToken) == null ? void 0 : Ir.tokenServiceProvider
|
|
3829
3829
|
} : void 0,
|
|
3830
|
-
// ToDo: add braintree
|
|
3831
3830
|
braintree: n.braintree ? {
|
|
3832
3831
|
payment_method_nonce: n.braintree.nonce
|
|
3833
3832
|
} : void 0
|
|
@@ -4051,7 +4050,7 @@ class Yc {
|
|
|
4051
4050
|
authorization: ((t = e == null ? void 0 : e.brain_tree_info) == null ? void 0 : t.client_token) || "",
|
|
4052
4051
|
onError: () => this.events.error.emit(),
|
|
4053
4052
|
onCancel: () => this.events.cancel.emit(),
|
|
4054
|
-
onSuccess: (r) => this.events.success.emit({ nonce: r.nonce, type: "
|
|
4053
|
+
onSuccess: (r) => this.events.success.emit({ nonce: r.nonce, type: "venmo" })
|
|
4055
4054
|
});
|
|
4056
4055
|
} catch (r) {
|
|
4057
4056
|
console.error(r);
|
|
@@ -4077,7 +4076,7 @@ class Yc {
|
|
|
4077
4076
|
return this.initGoogle();
|
|
4078
4077
|
case "paypal":
|
|
4079
4078
|
return this.initPayPal();
|
|
4080
|
-
case "
|
|
4079
|
+
case "venmo":
|
|
4081
4080
|
return this.initBraintreeVenmo();
|
|
4082
4081
|
case "card":
|
|
4083
4082
|
return this.initCard();
|
|
@@ -5107,8 +5106,8 @@ class rd {
|
|
|
5107
5106
|
case "paypal":
|
|
5108
5107
|
return this.handleSuccess({ clientSession: t, paypal: { billing_agreement_token: e } });
|
|
5109
5108
|
// TODO: add braintree
|
|
5110
|
-
case "
|
|
5111
|
-
return console.log("-----
|
|
5109
|
+
case "venmo":
|
|
5110
|
+
return console.log("----- venmo success data", e), this.handleSuccess({ clientSession: t, braintree: { nonce: e } });
|
|
5112
5111
|
}
|
|
5113
5112
|
}), this.form.addEventListener("close", () => j(this, null, function* () {
|
|
5114
5113
|
this.isLoading || (this.hideError(), yield se(this.form.element, Pe.close, Pe.transition), this.form.element.classList.add(le.hidden), this.buttons.buttons.classList.add(le.btnsInitial), this.buttons.buttons.classList.remove(le.hidden), yield se(this.buttons.buttons, gt.open, gt.transition), this.isFormOpen = !1);
|