@alipay/ams-checkout 0.0.1710212811-dev.6 → 0.0.1710212811-dev.9

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');
@@ -24,6 +24,7 @@ declare class ApplePayComponent extends CoreInstance {
24
24
  * @returns
25
25
  */
26
26
  canMakePayments(subTypeEnum?: ApplePaySubTypeEnum): boolean;
27
+ isAppPayEnabled(): boolean;
27
28
  /**
28
29
  * Submit Pay
29
30
  * @param paymentSessionData
@@ -140,6 +140,11 @@ var ApplePayComponent = /*#__PURE__*/function (_CoreInstance) {
140
140
  value: function canMakePayments(subTypeEnum) {
141
141
  return ApplePayService.canMakePayments(subTypeEnum);
142
142
  }
143
+ }, {
144
+ key: "isAppPayEnabled",
145
+ value: function isAppPayEnabled() {
146
+ return true;
147
+ }
143
148
 
144
149
  /**
145
150
  * Submit Pay
@@ -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.6",
3
+ "version": "0.0.1710212811-dev.9",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "esm/index.js",