@paystack/inline-js 2.15.0-dev.4 → 2.15.0-dev.5

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
@@ -832,9 +832,14 @@ var PaystackPop = (function () {
832
832
  label = _ref4.label;
833
833
 
834
834
  var applePayPaymentInfo = document.createElement('div');
835
- var formattedAmount = new Intl.NumberFormat('en').format(amount / 100);
835
+ var formattedAmount = new Intl.NumberFormat('en', {
836
+ style: 'currency',
837
+ currency: currency,
838
+ maximumFractionDigits: 2,
839
+ minimumFractionDigits: 0
840
+ }).format(amount / 100);
836
841
  applePayPaymentInfo.classList.add('payment-info');
837
- applePayPaymentInfo.innerHTML = "<img class=\"merchant-logo\" src=\"".concat(merchantLogo, "\" alt=\"").concat(merchantName, " Logo\">\n <div class=\"customer-info\">\n <div class=\"customer-email\">").concat(label || email, "</div>\n <div class=\"transaction-amount\">Pay <span class=\"amount\">").concat(currency, " ").concat(formattedAmount, "</span></div>\n </div>");
842
+ applePayPaymentInfo.innerHTML = "<img class=\"merchant-logo\" src=\"".concat(merchantLogo, "\" alt=\"").concat(merchantName, " Logo\">\n <div class=\"customer-info\">\n <div class=\"customer-email\">").concat(label || email, "</div>\n <div class=\"transaction-amount\">Pay <span class=\"amount\">").concat(formattedAmount, "</span></div>\n </div>");
838
843
  content.appendChild(applePayPaymentInfo);
839
844
  content.innerHTML += applePayCloseButton;
840
845
  var wrapper = document.createElement('div');
package/es/inline.js CHANGED
@@ -829,9 +829,14 @@ function mountPreCheckoutModal(id, transaction) {
829
829
  label = _ref4.label;
830
830
 
831
831
  var applePayPaymentInfo = document.createElement('div');
832
- var formattedAmount = new Intl.NumberFormat('en').format(amount / 100);
832
+ var formattedAmount = new Intl.NumberFormat('en', {
833
+ style: 'currency',
834
+ currency: currency,
835
+ maximumFractionDigits: 2,
836
+ minimumFractionDigits: 0
837
+ }).format(amount / 100);
833
838
  applePayPaymentInfo.classList.add('payment-info');
834
- applePayPaymentInfo.innerHTML = "<img class=\"merchant-logo\" src=\"".concat(merchantLogo, "\" alt=\"").concat(merchantName, " Logo\">\n <div class=\"customer-info\">\n <div class=\"customer-email\">").concat(label || email, "</div>\n <div class=\"transaction-amount\">Pay <span class=\"amount\">").concat(currency, " ").concat(formattedAmount, "</span></div>\n </div>");
839
+ applePayPaymentInfo.innerHTML = "<img class=\"merchant-logo\" src=\"".concat(merchantLogo, "\" alt=\"").concat(merchantName, " Logo\">\n <div class=\"customer-info\">\n <div class=\"customer-email\">").concat(label || email, "</div>\n <div class=\"transaction-amount\">Pay <span class=\"amount\">").concat(formattedAmount, "</span></div>\n </div>");
835
840
  content.appendChild(applePayPaymentInfo);
836
841
  content.innerHTML += applePayCloseButton;
837
842
  var wrapper = document.createElement('div');
package/lib/inline.js CHANGED
@@ -831,9 +831,14 @@ function mountPreCheckoutModal(id, transaction) {
831
831
  label = _ref4.label;
832
832
 
833
833
  var applePayPaymentInfo = document.createElement('div');
834
- var formattedAmount = new Intl.NumberFormat('en').format(amount / 100);
834
+ var formattedAmount = new Intl.NumberFormat('en', {
835
+ style: 'currency',
836
+ currency: currency,
837
+ maximumFractionDigits: 2,
838
+ minimumFractionDigits: 0
839
+ }).format(amount / 100);
835
840
  applePayPaymentInfo.classList.add('payment-info');
836
- applePayPaymentInfo.innerHTML = "<img class=\"merchant-logo\" src=\"".concat(merchantLogo, "\" alt=\"").concat(merchantName, " Logo\">\n <div class=\"customer-info\">\n <div class=\"customer-email\">").concat(label || email, "</div>\n <div class=\"transaction-amount\">Pay <span class=\"amount\">").concat(currency, " ").concat(formattedAmount, "</span></div>\n </div>");
841
+ applePayPaymentInfo.innerHTML = "<img class=\"merchant-logo\" src=\"".concat(merchantLogo, "\" alt=\"").concat(merchantName, " Logo\">\n <div class=\"customer-info\">\n <div class=\"customer-email\">").concat(label || email, "</div>\n <div class=\"transaction-amount\">Pay <span class=\"amount\">").concat(formattedAmount, "</span></div>\n </div>");
837
842
  content.appendChild(applePayPaymentInfo);
838
843
  content.innerHTML += applePayCloseButton;
839
844
  var wrapper = document.createElement('div');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paystack/inline-js",
3
- "version": "2.15.0-dev.4",
3
+ "version": "2.15.0-dev.5",
4
4
  "description": "Client-side library to load the Paystack checkout form",
5
5
  "main": "lib/inline.js",
6
6
  "module": "es/inline.js",