Skip to content

Commit 18c515c

Browse files
Merge pull request #29 from Flutterwave/fix-multiple-callback-response
fix multiple callback response
2 parents ff1269d + 06aa65c commit 18c515c

File tree

6 files changed

+11
-1
lines changed

6 files changed

+11
-1
lines changed

dist/index.es.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ var FlutterWaveButton = function (_a) {
218218
function closePaymentModal() {
219219
document.getElementsByName('checkout').forEach(function (item) {
220220
item.setAttribute('style', 'position:fixed;top:0;left:0;z-index:-1;border:none;opacity:0;pointer-events:none;width:100%;height:100%;');
221+
item.setAttribute('id', 'flwpugpaidid');
222+
item.setAttribute('src', 'https://checkout.flutterwave.com/?');
221223
document.body.style.overflow = '';
222224
});
223225
}

dist/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ var FlutterWaveButton = function (_a) {
222222
function closePaymentModal() {
223223
document.getElementsByName('checkout').forEach(function (item) {
224224
item.setAttribute('style', 'position:fixed;top:0;left:0;z-index:-1;border:none;opacity:0;pointer-events:none;width:100%;height:100%;');
225+
item.setAttribute('id', 'flwpugpaidid');
226+
item.setAttribute('src', 'https://checkout.flutterwave.com/?');
225227
document.body.style.overflow = '';
226228
});
227229
}

example/src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useFlutterwave, FlutterWaveButton, closePaymentModal } from './dist/ind
44

55
export default function App() {
66
const config = {
7-
public_key: 'FLWPUBK-**************************-X',
7+
public_key: "FLWPUBK-**************************-X",
88
tx_ref: Date.now(),
99
amount: 10,
1010
currency: 'NGN',

example/src/dist/index.es.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ var FlutterWaveButton = function (_a) {
218218
function closePaymentModal() {
219219
document.getElementsByName('checkout').forEach(function (item) {
220220
item.setAttribute('style', 'position:fixed;top:0;left:0;z-index:-1;border:none;opacity:0;pointer-events:none;width:100%;height:100%;');
221+
item.setAttribute('id', 'flwpugpaidid');
222+
item.setAttribute('src', 'https://checkout.flutterwave.com/?');
221223
document.body.style.overflow = '';
222224
});
223225
}

example/src/dist/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ var FlutterWaveButton = function (_a) {
222222
function closePaymentModal() {
223223
document.getElementsByName('checkout').forEach(function (item) {
224224
item.setAttribute('style', 'position:fixed;top:0;left:0;z-index:-1;border:none;opacity:0;pointer-events:none;width:100%;height:100%;');
225+
item.setAttribute('id', 'flwpugpaidid');
226+
item.setAttribute('src', 'https://checkout.flutterwave.com/?');
225227
document.body.style.overflow = '';
226228
});
227229
}

src/closeModal.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
document.getElementsByName('checkout').forEach(item => {
66
item.setAttribute('style',
77
'position:fixed;top:0;left:0;z-index:-1;border:none;opacity:0;pointer-events:none;width:100%;height:100%;');
8+
item.setAttribute('id','flwpugpaidid');
9+
item.setAttribute('src','https://checkout.flutterwave.com/?')
810
document.body.style.overflow = '';
911
})
1012

0 commit comments

Comments
 (0)