@seamlessdocs/payment-modals 1.0.44 → 1.0.46

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/index.html CHANGED
@@ -21,29 +21,29 @@
21
21
  <script src="https://core.spreedly.com/iframe/express-2.min.js"></script>
22
22
  <script src="./build/payment-modals.js"></script>
23
23
  <script>
24
- const triggers = document.querySelectorAll('.links a');
25
- const callbacks = {
26
- withoutPay: () => {
24
+ var triggers = document.querySelectorAll('.links a');
25
+ var callbacks = {
26
+ withoutPay: function() {
27
27
  console.log('withoutPay');
28
28
  },
29
- withPay: () => {
29
+ withPay: function() {
30
30
  console.log('withPay');
31
31
  },
32
- close: () => {
32
+ close: function() {
33
33
  console.log('close');
34
34
  },
35
- skip: () => {
35
+ skip: function() {
36
36
  console.log('skip');
37
37
  },
38
- retry: () => {
38
+ retry: function() {
39
39
  console.log('retry');
40
40
  },
41
- successModalContinue: () => {
41
+ successModalContinue: function() {
42
42
  console.log('successModalContinue');
43
43
  }
44
44
  };
45
45
 
46
- triggers[0].addEventListener('click', event => {
46
+ triggers[0].addEventListener('click', function(event) {
47
47
  window.handlePaymentModal.chooseModal({
48
48
  title: 'Pay now or later',
49
49
  description:
@@ -56,10 +56,10 @@
56
56
  }
57
57
  });
58
58
  });
59
- triggers[1].addEventListener('click', event => {
59
+ triggers[1].addEventListener('click', function(event) {
60
60
  window.handlePaymentModal.processingModal();
61
61
  });
62
- triggers[2].addEventListener('click', event => {
62
+ triggers[2].addEventListener('click', function(event) {
63
63
  window.handlePaymentModal.errorModal({
64
64
  isOptional: false,
65
65
  callbacks: {
@@ -68,7 +68,7 @@
68
68
  }
69
69
  });
70
70
  });
71
- triggers[3].addEventListener('click', event => {
71
+ triggers[3].addEventListener('click', function(event) {
72
72
  window.handlePaymentModal.errorModal({
73
73
  isOptional: true,
74
74
  errorText: 'error',
@@ -79,11 +79,11 @@
79
79
  }
80
80
  });
81
81
  });
82
- triggers[4].addEventListener('click', event => {
82
+ triggers[4].addEventListener('click', function(event) {
83
83
  window.handlePaymentModal.successModal({ description: 'my text' });
84
84
  });
85
85
 
86
- triggers[5].addEventListener('click', event => {
86
+ triggers[5].addEventListener('click', function(event) {
87
87
  window.handlePaymentModal.selectPaymentModal({
88
88
  isPaymentRequired: false,
89
89
  bankAccountValue: 25,
@@ -93,23 +93,23 @@
93
93
  isCreditCardFeeEnable: true,
94
94
  isBankAccountFeeEnable: false,
95
95
  callbacks: {
96
- onPayByBank: () => {
96
+ onPayByBank: function() {
97
97
  console.log('pay by bank');
98
98
  },
99
- onPayByCreditCard: () => {
99
+ onPayByCreditCard: function() {
100
100
  console.log('pay by credit card');
101
101
  },
102
- onClose: () => {
102
+ onClose: function() {
103
103
  console.log('close');
104
104
  },
105
- onSkipPayment: () => {
105
+ onSkipPayment: function() {
106
106
  console.log('onSkipPayment');
107
107
  }
108
108
  }
109
109
  });
110
110
  });
111
111
 
112
- triggers[6].addEventListener('click', event => {
112
+ triggers[6].addEventListener('click', function(event) {
113
113
  window.handlePaymentModal.achPaymentModal({
114
114
  amount: 22,
115
115
  totalAmount: 24.24,
@@ -117,19 +117,19 @@
117
117
  description: 'Text from the description field in the gateway details modal.',
118
118
  feeName: 'ololo',
119
119
  callbacks: {
120
- onPay: (...args) => {
121
- setTimeout(() => {
122
- alert(JSON.stringify(args, null, 2));
120
+ onPay: function() {
121
+ setTimeout(function() {
122
+ console.log('Pay');
123
123
  }, 400);
124
124
  },
125
- onClose: () => {
125
+ onClose: function() {
126
126
  console.log('close');
127
127
  }
128
128
  }
129
129
  });
130
130
  });
131
131
 
132
- triggers[7].addEventListener('click', event => {
132
+ triggers[7].addEventListener('click', function(event) {
133
133
  window.handlePaymentModal.none();
134
134
  });
135
135
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamlessdocs/payment-modals",
3
- "version": "1.0.44",
3
+ "version": "1.0.46",
4
4
  "description": "",
5
5
  "main": "build/payment-modals.js",
6
6
  "scripts": {
@@ -41,6 +41,7 @@
41
41
  "webpack-dev-server": "^3.2.1"
42
42
  },
43
43
  "dependencies": {
44
+ "@babel/polyfill": "^7.12.1",
44
45
  "babel-plugin-import": "^1.11.0",
45
46
  "base64-image-loader": "^1.2.1",
46
47
  "classnames": "^2.2.6",
package/src/index.jsx CHANGED
@@ -1,3 +1,5 @@
1
+ import '@babel/polyfill';
2
+
1
3
  import React from 'react';
2
4
  import ReactDOM from 'react-dom';
3
5