Created
February 2, 2017 09:51
-
-
Save didagu/7f83faa0b0013228a155f658e13f974a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$url="https://checkout.simplepay.ng/v2/payments/form/"; | |
$fields=array('key'=>'test_pu_18fb91d02d7c4be5a386309c882bd176', | |
'description'=>'holla i am here', | |
'payment_type'=>'checkout' , | |
'amount' => $subtotal, | |
'email' => $email, | |
'currency'=>'NGN', | |
'payment_id'=>'XVTID', | |
'success_url'=>'http://localhost/tender/tender/epayments/confirmation', | |
'cancel_url'=>'http://localhost/tender/tender/epayments/confirmation', | |
'fail_url' => 'http://localhost/tender/tender/epayments/confirmation' | |
); | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_POST,1); | |
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($fields)); | |
$result = curl_exec($ch); | |
if (curl_errno($ch)){ | |
debug(curl_error($ch)); | |
}else{ | |
curl_close($ch); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment