Using the Paystack Payment API — Part I
Subomi Oluwalana
552

<script>
 function payWithPaystack(){
 var handler = PaystackPop.setup({
 key: ‘pk_test_baad97319b760bb836a0c1cb81848264cde2fea6’,
 email: ‘customer@email.com’,
 amount: “.$ftotal.” * 100,
 ref: ‘’,
 metadata: {
 custom_fields: [
 {
 display_name: ‘Mobile Number’,
 variable_name: ‘mobile_number’,
 value: ‘+2348012345678’
 }
 ]
 },
 callback: function(response){
 var verifying = $.get( ‘http://mysite.org/core/ver/verification.php?reference=’ + response.reference);
 verifying.done(function( data ) { /* give value saved in data */ });
 alert(response.reference)
 
 },
 onClose: function(){
 
 }
 });
 handler.openIframe();
 }
 </script>

i don’t get redirected to the verification page pls help