@alipay/ams-checkout 0.0.1711691167-dev.10 → 0.0.1711691167-dev.11
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.
@@ -172,7 +172,7 @@ export var PaypalBusSubscriber = /*#__PURE__*/function (_BusSubscriber) {
|
|
172
172
|
};
|
173
173
|
}());
|
174
174
|
_defineProperty(_assertThisInitialized(_this), "createOrder", /*#__PURE__*/function () {
|
175
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_data, _action, paymentSessionData) {
|
175
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_data, _action, paymentSessionData, env) {
|
176
176
|
var _submitPayInfoRes$ext;
|
177
177
|
var submitPayInfoRes;
|
178
178
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
@@ -181,7 +181,10 @@ export var PaypalBusSubscriber = /*#__PURE__*/function (_BusSubscriber) {
|
|
181
181
|
_context2.next = 2;
|
182
182
|
return submitPayInfo({
|
183
183
|
paymentSessionData: paymentSessionData
|
184
|
-
}, {
|
184
|
+
}, {
|
185
|
+
env: env,
|
186
|
+
timeout: 15000
|
187
|
+
}, _this.logger);
|
185
188
|
case 2:
|
186
189
|
submitPayInfoRes = _context2.sent;
|
187
190
|
if (!(!(submitPayInfoRes !== null && submitPayInfoRes !== void 0 && submitPayInfoRes.success) || !(submitPayInfoRes !== null && submitPayInfoRes !== void 0 && (_submitPayInfoRes$ext = submitPayInfoRes.extendInfo) !== null && _submitPayInfoRes$ext !== void 0 && _submitPayInfoRes$ext.channelOrderId))) {
|
@@ -204,7 +207,7 @@ export var PaypalBusSubscriber = /*#__PURE__*/function (_BusSubscriber) {
|
|
204
207
|
}
|
205
208
|
}, _callee2);
|
206
209
|
}));
|
207
|
-
return function (_x2, _x3, _x4) {
|
210
|
+
return function (_x2, _x3, _x4, _x5) {
|
208
211
|
return _ref4.apply(this, arguments);
|
209
212
|
};
|
210
213
|
}());
|
@@ -230,7 +233,7 @@ export var PaypalBusSubscriber = /*#__PURE__*/function (_BusSubscriber) {
|
|
230
233
|
}
|
231
234
|
}, _callee3);
|
232
235
|
}));
|
233
|
-
return function (
|
236
|
+
return function (_x6) {
|
234
237
|
return _ref5.apply(this, arguments);
|
235
238
|
};
|
236
239
|
}());
|
@@ -256,7 +259,7 @@ export var PaypalBusSubscriber = /*#__PURE__*/function (_BusSubscriber) {
|
|
256
259
|
}
|
257
260
|
}, _callee4);
|
258
261
|
}));
|
259
|
-
return function (
|
262
|
+
return function (_x7) {
|
260
263
|
return _ref6.apply(this, arguments);
|
261
264
|
};
|
262
265
|
}());
|
@@ -280,7 +283,7 @@ export var PaypalBusSubscriber = /*#__PURE__*/function (_BusSubscriber) {
|
|
280
283
|
}
|
281
284
|
}, _callee5);
|
282
285
|
}));
|
283
|
-
return function (
|
286
|
+
return function (_x8, _x9) {
|
284
287
|
return _ref7.apply(this, arguments);
|
285
288
|
};
|
286
289
|
}());
|
@@ -296,6 +299,7 @@ export var PaypalBusSubscriber = /*#__PURE__*/function (_BusSubscriber) {
|
|
296
299
|
key: "renderPaypalButton",
|
297
300
|
value: function renderPaypalButton(context, message) {
|
298
301
|
var _data$options,
|
302
|
+
_data$options2,
|
299
303
|
_data$appendParams,
|
300
304
|
_data$appendParams2,
|
301
305
|
_data$appendParams3,
|
@@ -305,6 +309,7 @@ export var PaypalBusSubscriber = /*#__PURE__*/function (_BusSubscriber) {
|
|
305
309
|
var data = message.getJSONObject();
|
306
310
|
var paypalPluginProps = {
|
307
311
|
locale: (_data$options = data.options) === null || _data$options === void 0 ? void 0 : _data$options.locale,
|
312
|
+
environment: (_data$options2 = data.options) === null || _data$options2 === void 0 ? void 0 : _data$options2.environment,
|
308
313
|
paymentSessionData: (_data$appendParams = data.appendParams) === null || _data$appendParams === void 0 || (_data$appendParams = _data$appendParams.iframeNodesParams) === null || _data$appendParams === void 0 ? void 0 : _data$appendParams.sessionData,
|
309
314
|
paymentSessionFactor: (_data$appendParams2 = data.appendParams) === null || _data$appendParams2 === void 0 || (_data$appendParams2 = _data$appendParams2.iframeNodesParams) === null || _data$appendParams2 === void 0 || (_data$appendParams2 = _data$appendParams2.paymentSessionMetaData) === null || _data$appendParams2 === void 0 ? void 0 : _data$appendParams2.paymentSessionFactor,
|
310
315
|
selector: (_data$appendParams3 = data.appendParams) === null || _data$appendParams3 === void 0 || (_data$appendParams3 = _data$appendParams3.iframeNodesParams) === null || _data$appendParams3 === void 0 ? void 0 : _data$appendParams3.selector,
|
@@ -323,7 +328,7 @@ export var PaypalBusSubscriber = /*#__PURE__*/function (_BusSubscriber) {
|
|
323
328
|
fundingSource: undefined,
|
324
329
|
onShippingChange: _this2.onShippingChange,
|
325
330
|
createOrder: function createOrder(data, action) {
|
326
|
-
return _this2.createOrder(data, action, paypalPluginProps.paymentSessionData);
|
331
|
+
return _this2.createOrder(data, action, paypalPluginProps.paymentSessionData, paypalPluginProps.environment);
|
327
332
|
},
|
328
333
|
onApprove: _this2.onApprove,
|
329
334
|
onCancel: _this2.onCancel
|