@paystack/inline-js 2.19.0-dev.8 → 2.19.0-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.
package/dist/inline.js CHANGED
@@ -1854,7 +1854,8 @@ var PaystackPop = (function () {
1854
1854
  return new Promise(function (resolve, reject) {
1855
1855
  transaction.requestInline().then(function (response) {
1856
1856
  var canPayWithApplePay = isAppleOS() && canUseApplePay(response.channels);
1857
- var canPayWithVault = response.link_config.enabled && response.link_config.has_payment_instruments;
1857
+ var isSubscriptionPayment = response.custom_filters.recurring || response.plan_details;
1858
+ var canPayWithVault = !isSubscriptionPayment && response.link_config.enabled && response.link_config.has_payment_instruments;
1858
1859
  var shouldLoadPreCheckoutModal = canPayWithVault || canPayWithApplePay;
1859
1860
 
1860
1861
  if (!shouldLoadPreCheckoutModal) {
package/es/inline.js CHANGED
@@ -1851,7 +1851,8 @@ var Inline = /*#__PURE__*/function () {
1851
1851
  return new Promise(function (resolve, reject) {
1852
1852
  transaction.requestInline().then(function (response) {
1853
1853
  var canPayWithApplePay = isAppleOS() && canUseApplePay(response.channels);
1854
- var canPayWithVault = response.link_config.enabled && response.link_config.has_payment_instruments;
1854
+ var isSubscriptionPayment = response.custom_filters.recurring || response.plan_details;
1855
+ var canPayWithVault = !isSubscriptionPayment && response.link_config.enabled && response.link_config.has_payment_instruments;
1855
1856
  var shouldLoadPreCheckoutModal = canPayWithVault || canPayWithApplePay;
1856
1857
 
1857
1858
  if (!shouldLoadPreCheckoutModal) {
package/lib/inline.js CHANGED
@@ -1853,7 +1853,8 @@ var Inline = /*#__PURE__*/function () {
1853
1853
  return new Promise(function (resolve, reject) {
1854
1854
  transaction.requestInline().then(function (response) {
1855
1855
  var canPayWithApplePay = isAppleOS() && canUseApplePay(response.channels);
1856
- var canPayWithVault = response.link_config.enabled && response.link_config.has_payment_instruments;
1856
+ var isSubscriptionPayment = response.custom_filters.recurring || response.plan_details;
1857
+ var canPayWithVault = !isSubscriptionPayment && response.link_config.enabled && response.link_config.has_payment_instruments;
1857
1858
  var shouldLoadPreCheckoutModal = canPayWithVault || canPayWithApplePay;
1858
1859
 
1859
1860
  if (!shouldLoadPreCheckoutModal) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paystack/inline-js",
3
- "version": "2.19.0-dev.8",
3
+ "version": "2.19.0-dev.9",
4
4
  "description": "Client-side library to load the Paystack checkout form",
5
5
  "main": "lib/inline.js",
6
6
  "module": "es/inline.js",