odeme - Kuzey Promosyon - Promosyon Ürünleri Toptan Satışı

$merchant_id, 'user_ip'=>$user_ip, 'merchant_oid'=>$merchant_oid, 'email'=>$email, 'payment_amount'=>$payment_amount, 'paytr_token'=>$paytr_token, 'user_basket'=>$user_basket, 'debug_on'=>$debug_on, 'no_installment'=>$no_installment, 'max_installment'=>$max_installment, 'user_name'=>$user_name, 'user_address'=>$user_address, 'user_phone'=>$user_phone, 'merchant_ok_url'=>$merchant_ok_url, 'merchant_fail_url'=>$merchant_fail_url, 'timeout_limit'=>$timeout_limit, 'currency'=>$currency, 'test_mode'=>$test_mode ); $ch=curl_init(); curl_setopt($ch, CURLOPT_URL, "https://www.paytr.com/odeme/api/get-token"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1) ; curl_setopt($ch, CURLOPT_POSTFIELDS, $post_vals); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_FRESH_CONNECT, true); curl_setopt($ch, CURLOPT_TIMEOUT, 20); $result = @curl_exec($ch); if(curl_errno($ch)) die("PAYTR IFRAME connection error. err:".curl_error($ch)); curl_close($ch); $result=json_decode($result,1); if($result['status']=='success') $token=$result['token']; else die("PAYTR IFRAME failed. reason:".$result['reason']); ?>