diff --git a/dist/index.es.js b/dist/index.es.js index 9d5a714..b1c67b4 100644 --- a/dist/index.es.js +++ b/dist/index.es.js @@ -218,6 +218,8 @@ var FlutterWaveButton = function (_a) { function closePaymentModal() { document.getElementsByName('checkout').forEach(function (item) { item.setAttribute('style', 'position:fixed;top:0;left:0;z-index:-1;border:none;opacity:0;pointer-events:none;width:100%;height:100%;'); + item.setAttribute('id', 'flwpugpaidid'); + item.setAttribute('src', 'https://checkout.flutterwave.com/?'); document.body.style.overflow = ''; }); } diff --git a/dist/index.js b/dist/index.js index c7757a2..1a3ac0e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -222,6 +222,8 @@ var FlutterWaveButton = function (_a) { function closePaymentModal() { document.getElementsByName('checkout').forEach(function (item) { item.setAttribute('style', 'position:fixed;top:0;left:0;z-index:-1;border:none;opacity:0;pointer-events:none;width:100%;height:100%;'); + item.setAttribute('id', 'flwpugpaidid'); + item.setAttribute('src', 'https://checkout.flutterwave.com/?'); document.body.style.overflow = ''; }); } diff --git a/example/src/App.js b/example/src/App.js index 26297a5..2e45050 100644 --- a/example/src/App.js +++ b/example/src/App.js @@ -4,7 +4,7 @@ import { useFlutterwave, FlutterWaveButton, closePaymentModal } from './dist/ind export default function App() { const config = { - public_key: 'FLWPUBK-**************************-X', + public_key: "FLWPUBK-**************************-X", tx_ref: Date.now(), amount: 10, currency: 'NGN', diff --git a/example/src/dist/index.es.js b/example/src/dist/index.es.js index 9d5a714..b1c67b4 100644 --- a/example/src/dist/index.es.js +++ b/example/src/dist/index.es.js @@ -218,6 +218,8 @@ var FlutterWaveButton = function (_a) { function closePaymentModal() { document.getElementsByName('checkout').forEach(function (item) { item.setAttribute('style', 'position:fixed;top:0;left:0;z-index:-1;border:none;opacity:0;pointer-events:none;width:100%;height:100%;'); + item.setAttribute('id', 'flwpugpaidid'); + item.setAttribute('src', 'https://checkout.flutterwave.com/?'); document.body.style.overflow = ''; }); } diff --git a/example/src/dist/index.js b/example/src/dist/index.js index c7757a2..1a3ac0e 100644 --- a/example/src/dist/index.js +++ b/example/src/dist/index.js @@ -222,6 +222,8 @@ var FlutterWaveButton = function (_a) { function closePaymentModal() { document.getElementsByName('checkout').forEach(function (item) { item.setAttribute('style', 'position:fixed;top:0;left:0;z-index:-1;border:none;opacity:0;pointer-events:none;width:100%;height:100%;'); + item.setAttribute('id', 'flwpugpaidid'); + item.setAttribute('src', 'https://checkout.flutterwave.com/?'); document.body.style.overflow = ''; }); } diff --git a/src/closeModal.tsx b/src/closeModal.tsx index c34ea0e..64bab6a 100644 --- a/src/closeModal.tsx +++ b/src/closeModal.tsx @@ -5,6 +5,8 @@ document.getElementsByName('checkout').forEach(item => { item.setAttribute('style', 'position:fixed;top:0;left:0;z-index:-1;border:none;opacity:0;pointer-events:none;width:100%;height:100%;'); + item.setAttribute('id','flwpugpaidid'); + item.setAttribute('src','https://checkout.flutterwave.com/?') document.body.style.overflow = ''; })