@nuskin/ns-shop 6.9.0 → 6.9.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/ns-shop",
3
- "version": "6.9.0",
3
+ "version": "6.9.1",
4
4
  "description": "The description that will amaze and astound your audience when they read it",
5
5
  "main": "src/shop.js",
6
6
  "scripts": {
@@ -273,18 +273,6 @@ const _checkExternalPaymentStatus = async (order, tdc, sections, adr) => {
273
273
  }
274
274
  _handleSuccess(order);
275
275
  break;
276
- case ExternalPaymentStatusEnum.CANCELED:
277
- _handleCanceled(status, tdc);
278
- _paymentErrorCallback(sections);
279
- break;
280
- case ExternalPaymentStatusEnum.DECLINED:
281
- _handleDeclined(status, tdc);
282
- _paymentErrorCallback(sections);
283
- break;
284
- case ExternalPaymentStatusEnum.ERROR:
285
- _handleError(status, tdc);
286
- _paymentErrorCallback(sections);
287
- break;
288
276
  default:
289
277
  _handleError(status, tdc);
290
278
  _paymentErrorCallback(sections);
@@ -340,33 +328,6 @@ const _handleSuccess = (order) => {
340
328
  CartService.goToCheckoutPage({route: 'orderconfirmation'});
341
329
  };
342
330
 
343
- const _handleCanceled = (status, tdc) => {
344
- hasErrorMessageForCheckoutPageFlag = true;
345
-
346
- errorMessageForCheckoutPage = tdc.canceledPaymentErrorMessage;
347
-
348
- // Message for developer.
349
- if (status.messages && status.messages[0]) {
350
- console.log(status.messages[0].technicalMessage);
351
- }
352
- };
353
-
354
- const _handleDeclined = (status, tdc) => {
355
- hasErrorMessageForCheckoutPageFlag = true;
356
-
357
- if (status.messages && status.messages[0]) {
358
- // Message for checkout page.
359
- errorMessageForCheckoutPage = status.messages[0].message;
360
-
361
- if (errorMessageForCheckoutPage === null || errorMessageForCheckoutPage.length === 0){
362
- errorMessageForCheckoutPage = tdc.declinedPaymentErrorMessage;
363
- }
364
-
365
- // Message for developer.
366
- console.log(status.messages[0].technicalMessage);
367
- }
368
- };
369
-
370
331
  const _handleError = (status,tdc) => {
371
332
  hasErrorMessageForCheckoutPageFlag = true;
372
333
 
@@ -63,7 +63,7 @@ let PaymentType = {
63
63
  CBLU: 132, // Carte Bleue
64
64
  '2C2P': 133,
65
65
  SIMV: 134,
66
- KLNA: 136
66
+ KLNA: 136 // Klarna
67
67
  };
68
68
 
69
69
  PaymentType.credit = [