@paystack/inline-js 2.16.0-dev.3 → 2.16.0-dev.4

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/dist/inline.js CHANGED
@@ -767,10 +767,11 @@ var PaystackPop = (function () {
767
767
  * but we have seen instances where that is not the case, causing the SDK to throw errors
768
768
  * so in this scenario, we opt out of using the SDK
769
769
  */
770
- if (window && !Array.isArray(window.webpackJsonp)) {
771
- throw new Error("Incorrect data type for 'webpackJsonp', expected array, got ".concat(_typeof(window.webpackJsonp), ". Switching to fallback apple pay button"));
772
- }
773
-
770
+ // if (window && !Array.isArray(window.webpackJsonp)) {
771
+ // throw new Error(
772
+ // `Incorrect data type for 'webpackJsonp', expected array, got ${typeof window.webpackJsonp}. Switching to fallback apple pay button`,
773
+ // );
774
+ // }
774
775
  mountApplePayButton(container, {
775
776
  styles: parseApplePayCustomStyles(styles.applePay),
776
777
  theme: styles.theme
@@ -2039,7 +2040,6 @@ var PaystackPop = (function () {
2039
2040
  var _this4 = this;
2040
2041
 
2041
2042
  var applePayButton = getApplePayButton(this.paymentRequestContainer);
2042
- console.log('apple pay button', JSON.stringify(applePayButton));
2043
2043
 
2044
2044
  applePayButton.onclick = function () {
2045
2045
  return _this4.startApplePay();
@@ -2049,18 +2049,14 @@ var PaystackPop = (function () {
2049
2049
  key: "registerPaymentRequestEventListeners",
2050
2050
  value: function registerPaymentRequestEventListeners() {
2051
2051
  var transaction = this.activeTransaction();
2052
- console.log('transaction', transaction);
2053
2052
 
2054
2053
  if (transaction) {
2055
2054
  if (canUseApplePay(transaction.response.channels)) {
2056
2055
  this.registerApplePayEventListener();
2057
- console.log('registered payment request event listeners');
2058
2056
  } else {
2059
2057
  removeAllChildNodes(this.paymentRequestContainer);
2060
- console.log('removed cn');
2061
2058
  }
2062
2059
  } else {
2063
- console.log('removed cn');
2064
2060
  removeAllChildNodes(this.paymentRequestContainer);
2065
2061
  }
2066
2062
  }
@@ -2071,7 +2067,6 @@ var PaystackPop = (function () {
2071
2067
 
2072
2068
  var paymentMethod = 'apple pay';
2073
2069
  var transaction = this.activeTransaction();
2074
- console.log('starting apple pay with transaction', transaction);
2075
2070
 
2076
2071
  if (transaction) {
2077
2072
  var paymentAttemptAnalyticsPayload = {
package/es/inline.js CHANGED
@@ -764,10 +764,11 @@ function mountPaymentRequestButtons(container, _ref3) {
764
764
  * but we have seen instances where that is not the case, causing the SDK to throw errors
765
765
  * so in this scenario, we opt out of using the SDK
766
766
  */
767
- if (window && !Array.isArray(window.webpackJsonp)) {
768
- throw new Error("Incorrect data type for 'webpackJsonp', expected array, got ".concat(_typeof(window.webpackJsonp), ". Switching to fallback apple pay button"));
769
- }
770
-
767
+ // if (window && !Array.isArray(window.webpackJsonp)) {
768
+ // throw new Error(
769
+ // `Incorrect data type for 'webpackJsonp', expected array, got ${typeof window.webpackJsonp}. Switching to fallback apple pay button`,
770
+ // );
771
+ // }
771
772
  mountApplePayButton(container, {
772
773
  styles: parseApplePayCustomStyles(styles.applePay),
773
774
  theme: styles.theme
@@ -2036,7 +2037,6 @@ var Inline = /*#__PURE__*/function () {
2036
2037
  var _this4 = this;
2037
2038
 
2038
2039
  var applePayButton = getApplePayButton(this.paymentRequestContainer);
2039
- console.log('apple pay button', JSON.stringify(applePayButton));
2040
2040
 
2041
2041
  applePayButton.onclick = function () {
2042
2042
  return _this4.startApplePay();
@@ -2046,18 +2046,14 @@ var Inline = /*#__PURE__*/function () {
2046
2046
  key: "registerPaymentRequestEventListeners",
2047
2047
  value: function registerPaymentRequestEventListeners() {
2048
2048
  var transaction = this.activeTransaction();
2049
- console.log('transaction', transaction);
2050
2049
 
2051
2050
  if (transaction) {
2052
2051
  if (canUseApplePay(transaction.response.channels)) {
2053
2052
  this.registerApplePayEventListener();
2054
- console.log('registered payment request event listeners');
2055
2053
  } else {
2056
2054
  removeAllChildNodes(this.paymentRequestContainer);
2057
- console.log('removed cn');
2058
2055
  }
2059
2056
  } else {
2060
- console.log('removed cn');
2061
2057
  removeAllChildNodes(this.paymentRequestContainer);
2062
2058
  }
2063
2059
  }
@@ -2068,7 +2064,6 @@ var Inline = /*#__PURE__*/function () {
2068
2064
 
2069
2065
  var paymentMethod = 'apple pay';
2070
2066
  var transaction = this.activeTransaction();
2071
- console.log('starting apple pay with transaction', transaction);
2072
2067
 
2073
2068
  if (transaction) {
2074
2069
  var paymentAttemptAnalyticsPayload = {
package/lib/inline.js CHANGED
@@ -766,10 +766,11 @@ function mountPaymentRequestButtons(container, _ref3) {
766
766
  * but we have seen instances where that is not the case, causing the SDK to throw errors
767
767
  * so in this scenario, we opt out of using the SDK
768
768
  */
769
- if (window && !Array.isArray(window.webpackJsonp)) {
770
- throw new Error("Incorrect data type for 'webpackJsonp', expected array, got ".concat(_typeof(window.webpackJsonp), ". Switching to fallback apple pay button"));
771
- }
772
-
769
+ // if (window && !Array.isArray(window.webpackJsonp)) {
770
+ // throw new Error(
771
+ // `Incorrect data type for 'webpackJsonp', expected array, got ${typeof window.webpackJsonp}. Switching to fallback apple pay button`,
772
+ // );
773
+ // }
773
774
  mountApplePayButton(container, {
774
775
  styles: parseApplePayCustomStyles(styles.applePay),
775
776
  theme: styles.theme
@@ -2038,7 +2039,6 @@ var Inline = /*#__PURE__*/function () {
2038
2039
  var _this4 = this;
2039
2040
 
2040
2041
  var applePayButton = getApplePayButton(this.paymentRequestContainer);
2041
- console.log('apple pay button', JSON.stringify(applePayButton));
2042
2042
 
2043
2043
  applePayButton.onclick = function () {
2044
2044
  return _this4.startApplePay();
@@ -2048,18 +2048,14 @@ var Inline = /*#__PURE__*/function () {
2048
2048
  key: "registerPaymentRequestEventListeners",
2049
2049
  value: function registerPaymentRequestEventListeners() {
2050
2050
  var transaction = this.activeTransaction();
2051
- console.log('transaction', transaction);
2052
2051
 
2053
2052
  if (transaction) {
2054
2053
  if (canUseApplePay(transaction.response.channels)) {
2055
2054
  this.registerApplePayEventListener();
2056
- console.log('registered payment request event listeners');
2057
2055
  } else {
2058
2056
  removeAllChildNodes(this.paymentRequestContainer);
2059
- console.log('removed cn');
2060
2057
  }
2061
2058
  } else {
2062
- console.log('removed cn');
2063
2059
  removeAllChildNodes(this.paymentRequestContainer);
2064
2060
  }
2065
2061
  }
@@ -2070,7 +2066,6 @@ var Inline = /*#__PURE__*/function () {
2070
2066
 
2071
2067
  var paymentMethod = 'apple pay';
2072
2068
  var transaction = this.activeTransaction();
2073
- console.log('starting apple pay with transaction', transaction);
2074
2069
 
2075
2070
  if (transaction) {
2076
2071
  var paymentAttemptAnalyticsPayload = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paystack/inline-js",
3
- "version": "2.16.0-dev.3",
3
+ "version": "2.16.0-dev.4",
4
4
  "description": "Client-side library to load the Paystack checkout form",
5
5
  "main": "lib/inline.js",
6
6
  "module": "es/inline.js",