I have some enquiries concerning the flutterwave enaira api.
My use case is to approve payment (both deposit and withdrawal) from enaira speed wallet and redirect back to my website dapp ( either use transaction id for successful or failed payment to validate purchase/withdrawal on my end)
I’m able to get authenticated and successfully use the other payment methods to validate in my backend but for some reason enaira payment option which is enabled in dashboard (still on flutterwave testnet) but when i select either pay with qr, token or direct wallet debit, i get the error
Payment failed, possible connection issues. Please try making the payment again.
No browser console error either, not sure what’s happening, here’s my code running off of html/js using the flutterwave cdn script tag
FlutterwaveCheckout({
public_key: "FLWPUBK_TEST--X",
tx_ref: `ENSC-${Random}Token`,
amount: TOTAL,
currency: "NGN",
payment_options: "card, mobilemoneyghana, ussd,enaira",
callback: function (payment) {
// Send AJAX verification request to backend
verifyTransactionOnBackend(payment);
},
onclose: function (incomplete) {
if (incomplete || window.verified === false) {
document.querySelector("#payment-failed").style.display = 'block';
} else {
// document.querySelector("form").style.display = 'none';
// if (window.verified == true) {
// document.querySelector("#payment-success").style.display = 'block';
// } else {
// // document.querySelector("#payment-pending").style.display = 'block';
// }
}
},
meta: {
consumer_id: beneficiary,
consumer_mac: "92a3-912ba-1192a",
},
customer: {
email: "rose@unsinkableship.com",
phone_number: "08102909304",
name: "Rose DeWitt Bukater",
},
customizations: {
title: "ENSC ENERY",
description: "Payment ENSC Token",
logo: "https://www.logolynx.com/images/logolynx/22/2239ca38f5505fbfce7e55bbc0604386.jpeg",
},
});