Our robust eCommerce solutions empower you to provide customers with a more satisfying shopping experience online. The newest of these, The Payeezy eCommerce Solution, provides everything you need to set up an online store and expand the reach of your business with global payments, mobile-ready checkout and comprehensive security. And if you want one more way to increase your business’ online potential, use Apple Pay™ to create even more convenience for your customers.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | $url = 'https://api-cert.payeezy.com/v1/transactions'; $data = array("gateway_id" => "jJ4EvfiK19FOhsZe20SxMIC4bhjkMpGK", "password" => "b6gww6c10t4rbus0nw9acltxd3e3k7sd", "transaction_type" => "00", "amount" => "11", "cardholder_name" => "Test", "cc_number" => "411111111111111", "cc_expiry" => "0314"); $data_string= json_encode($data); // Initializing curl $ch = curl_init( $url ); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json; charset=UTF-8;','Accept: application/json' )); // Getting results $result = curl_exec($ch); // Getting jSON result string $data_string = json_decode($result); if ($data_string) { if ($data_string->bank_resp_code == '100') { print('Approved!'); } else { print($data_string->bank_message); } } else { print($result); } |
If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.
Article Tags: PHP, Technology, Tip and tricks, Web development