var paymentForm = document.getElementById('paymentForm');paymentForm.addEventListener('submit', payWithPaystack, false);function payWithPaystack() {var handler = PaystackPop.setup({key: 'YOUR_PUBLIC_KEY', // Replace with your public keyemail: document.getElementById('email-address').value,amount: document.getElementById('amount').value * 100, // the amount value is multiplied by 100 to convert to the lowest currency unitcurrency: 'NGN', // Use GHS for Ghana Cedis or USD for US Dollarsref: 'YOUR_REFERENCE', // Replace with a reference you generatedcallback: function(response) {//this happens after the payment is completed successfullyvar reference = response.reference;alert('Payment complete! Reference: ' + reference);// Make an AJAX call to your server with the reference to verify the transaction},onClose: function() {alert('Transaction was not completed, window closed.');},});handler.openIframe();}
Paystack payment gateway integrated in 1.4.0https://paystack.com/