@alipay/ams-checkout 0.0.1711691167-dev.15 → 0.0.1711691167-dev.16
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.
@@ -107,7 +107,7 @@ export var PaypalBusSubscriber = /*#__PURE__*/function (_BusSubscriber) {
|
|
107
107
|
_defineProperty(_assertThisInitialized(_this), "createPaypalScript", function (paypalPluginProps) {
|
108
108
|
var _paypalPluginProps$pa3, _paypalPluginProps$pa4, _paypalPluginProps$pa5, _paypalPluginProps$pa6;
|
109
109
|
var channelMerchantAccountId = (_paypalPluginProps$pa3 = paypalPluginProps.paymentSessionFactor) === null || _paypalPluginProps$pa3 === void 0 || (_paypalPluginProps$pa3 = _paypalPluginProps$pa3.merchantInfo) === null || _paypalPluginProps$pa3 === void 0 ? void 0 : _paypalPluginProps$pa3.channelMerchantClientId;
|
110
|
-
var accessToken = (_paypalPluginProps$pa4 = paypalPluginProps.paymentSessionFactor) === null || _paypalPluginProps$pa4 === void 0 || (_paypalPluginProps$pa4 = _paypalPluginProps$pa4.
|
110
|
+
var accessToken = (_paypalPluginProps$pa4 = paypalPluginProps.paymentSessionFactor) === null || _paypalPluginProps$pa4 === void 0 || (_paypalPluginProps$pa4 = _paypalPluginProps$pa4.paypal) === null || _paypalPluginProps$pa4 === void 0 ? void 0 : _paypalPluginProps$pa4.accessToken;
|
111
111
|
var locale = paypalPluginProps.locale;
|
112
112
|
var currency = (_paypalPluginProps$pa5 = paypalPluginProps.paymentSessionFactor) === null || _paypalPluginProps$pa5 === void 0 || (_paypalPluginProps$pa5 = _paypalPluginProps$pa5.paymentAmount) === null || _paypalPluginProps$pa5 === void 0 ? void 0 : _paypalPluginProps$pa5.currency;
|
113
113
|
var paymentMethodType = (_paypalPluginProps$pa6 = paypalPluginProps.paymentSessionFactor) === null || _paypalPluginProps$pa6 === void 0 || (_paypalPluginProps$pa6 = _paypalPluginProps$pa6.paymentMethodInfo) === null || _paypalPluginProps$pa6 === void 0 ? void 0 : _paypalPluginProps$pa6.paymentMethodType;
|
@@ -148,7 +148,7 @@ export var PaypalBusSubscriber = /*#__PURE__*/function (_BusSubscriber) {
|
|
148
148
|
}
|
149
149
|
src += urlSearchParams.toString();
|
150
150
|
script.src = src;
|
151
|
-
script
|
151
|
+
script.setAttribute('data-user-id-token', accessToken);
|
152
152
|
return script;
|
153
153
|
});
|
154
154
|
_defineProperty(_assertThisInitialized(_this), "onShippingChange", /*#__PURE__*/function () {
|
package/esm/types/index.d.ts
CHANGED
@@ -213,11 +213,11 @@ export interface IPaymentSessionFactor {
|
|
213
213
|
merchantInfo?: IMerchantInfo;
|
214
214
|
paymentMethodInfo: IPaymentMethodInfo;
|
215
215
|
paymentAmount?: IPaymentAmount;
|
216
|
+
paypal?: IPaypalConfig;
|
216
217
|
}
|
217
218
|
export interface IPaymentMethodInfo {
|
218
219
|
paymentMethodMetaData?: IPaymentMethodMetaData;
|
219
220
|
paymentMethodType?: PaypalMethodEnum;
|
220
|
-
paypal?: IPaypalConfig;
|
221
221
|
}
|
222
222
|
export type IPaypalConfig = {
|
223
223
|
accessToken: string;
|