@alipay/ams-checkout 0.0.1710212811-dev.5 → 0.0.1710212811-dev.8

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.
@@ -41,6 +41,7 @@ var ApplePayService = /*#__PURE__*/function () {
41
41
  merchantIdentifier: _this.merchantIdentifier,
42
42
  validationUrl: event.validationURL
43
43
  }).then(function (merchantSessionObjectString) {
44
+ console.log("onvalidatemerchant#merchantSessionObjectString", merchantSessionObjectString);
44
45
  var merchantSessionObject = JSON.parse(merchantSessionObjectString);
45
46
  _this.session.completeMerchantValidation(merchantSessionObject);
46
47
  _this.applePayTrace('completeMerchantValidation');
@@ -91,7 +92,7 @@ var ApplePayService = /*#__PURE__*/function () {
91
92
  order = paymentSessionFactor.order,
92
93
  recurringInfo = paymentSessionFactor.recurringInfo;
93
94
  _this.merchantIdentifier = merchantInfo === null || merchantInfo === void 0 ? void 0 : merchantInfo.partnerId;
94
- if (!(extendInfo !== null && extendInfo !== void 0 && extendInfo.merchantCapabilities) || !(extendInfo !== null && extendInfo !== void 0 && extendInfo.supportedNetworks) || !(merchantInfo !== null && merchantInfo !== void 0 && merchantInfo.registeredCountry) || !(paymentAmount !== null && paymentAmount !== void 0 && paymentAmount.currency) || !(paymentAmount !== null && paymentAmount !== void 0 && paymentAmount.value)) {
95
+ if (!(extendInfo !== null && extendInfo !== void 0 && extendInfo.merchantCapabilities) || !(extendInfo !== null && extendInfo !== void 0 && extendInfo.supportedNetworks) || !(merchantInfo !== null && merchantInfo !== void 0 && merchantInfo.registeredCountry) || !(paymentAmount !== null && paymentAmount !== void 0 && paymentAmount.currency) || !(paymentAmount !== null && paymentAmount !== void 0 && paymentAmount.value) || !(merchantInfo !== null && merchantInfo !== void 0 && merchantInfo.merchantName)) {
95
96
  _this.logError("invalid session data");
96
97
  return;
97
98
  }
@@ -129,7 +130,7 @@ var ApplePayService = /*#__PURE__*/function () {
129
130
  currencyCode: paymentAmount === null || paymentAmount === void 0 ? void 0 : paymentAmount.currency,
130
131
  total: {
131
132
  type: 'final',
132
- label: extendInfo === null || extendInfo === void 0 ? void 0 : extendInfo.merchantName,
133
+ label: merchantInfo === null || merchantInfo === void 0 ? void 0 : merchantInfo.merchantName,
133
134
  amount: paymentAmount === null || paymentAmount === void 0 ? void 0 : paymentAmount.value
134
135
  },
135
136
  recurringPaymentRequest: recurringRequest,
@@ -144,7 +145,7 @@ var ApplePayService = /*#__PURE__*/function () {
144
145
  currencyCode: paymentAmount === null || paymentAmount === void 0 ? void 0 : paymentAmount.currency,
145
146
  total: {
146
147
  type: 'final',
147
- label: extendInfo === null || extendInfo === void 0 ? void 0 : extendInfo.merchantName,
148
+ label: merchantInfo === null || merchantInfo === void 0 ? void 0 : merchantInfo.merchantName,
148
149
  amount: paymentAmount === null || paymentAmount === void 0 ? void 0 : paymentAmount.value
149
150
  }
150
151
  };
@@ -154,7 +155,11 @@ var ApplePayService = /*#__PURE__*/function () {
154
155
  _this.session.onpaymentauthorized = _this.onpaymentauthorized;
155
156
  _this.session.oncancel = function () {
156
157
  _this.logError('UserCancel');
157
- _this.session.abort();
158
+ try {
159
+ _this.session.abort();
160
+ } catch (error) {
161
+ console.log("session.abort() error");
162
+ }
158
163
  };
159
164
  _this.session.begin();
160
165
  _this.applePayTrace('sessionBegin');
@@ -360,9 +360,12 @@ var ApplePayComponent = /*#__PURE__*/function (_CoreInstance) {
360
360
  };
361
361
  // set Apple Pay params
362
362
  this._applePayService.setApplePayParams(getMerchantSession, completePaymentAuthorized, completeApplePay, logError, applePayTrace);
363
-
364
363
  // init Apple Pay service
365
- this._applePayService.startPay(this._parseData);
364
+ try {
365
+ this._applePayService.startPay(this._parseData);
366
+ } catch (error) {
367
+ logError("appple runtime excepiton", error);
368
+ }
366
369
  }
367
370
  }]);
368
371
  return ApplePayComponent;
@@ -138,11 +138,11 @@ export interface IpaymentSessionMetaData {
138
138
  extendInfo?: {
139
139
  merchantCapabilities?: string[];
140
140
  supportedNetworks?: string[];
141
- merchantName?: string;
142
141
  };
143
142
  merchantInfo?: {
144
143
  registeredCountry?: string;
145
144
  partnerId?: string;
145
+ merchantName?: string;
146
146
  };
147
147
  order?: {
148
148
  orderDescription: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alipay/ams-checkout",
3
- "version": "0.0.1710212811-dev.5",
3
+ "version": "0.0.1710212811-dev.8",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "esm/index.js",