Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
Удаленная работа для IT-специалистов
curl "https://cpay.tranzzo.com/api/v1/pos/${POS_ID}/orders/0" \ -H "X-API-AUTH: CPAY ${API_KEY}:${API_SECRET}" \ -H "X-API-KEY: ${ENDPOINTS_KEY}"
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://cpay.tranzzo.com/api/v1/pos/${POS_ID}/orders/0"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $headers = [ 'X-API-AUTH: CPAY ${API_KEY}:${API_SECRET}', 'X-API-KEY: ${ENDPOINTS_KEY}' ]; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $server_output = curl_exec ($ch); curl_close ($ch);
-X POST -d '{ "pos_id": "${POS_ID}", "mode": "hosted", "method": "purchase", "amount": 1, "currency": "UAH", "description": "description_1", "order_id": "123", "order_3ds_bypass": "always", "server_url": "https://callback.blackhole.com/callback", "result_url": "https://example.com/result", "payload": "sale=true" }' $d = array( "pos_id": "${POS_ID}", "mode": "hosted", "method": "purchase", "amount": 1, "currency": "UAH", "description": "description_1", "order_id": "123", "order_3ds_bypass": "always", "server_url": "https://callback.blackhole.com/callback", "result_url": "https://example.com/result", "payload": "sale=true" ); curl_setopt($ch, CURLOPT_POST, $d);
curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $d);
curl_setopt($ch, CURLOPT_COOKIESESSION, true); curl_setopt($ch, CURLOPT_COOKIEFILE, $file); curl_setopt($ch, CURLOPT_COOKIEJAR, $file);