Created
September 28, 2017 16:26
-
-
Save alankimo/153ce24fddf713ed6022a18d68def6c3 to your computer and use it in GitHub Desktop.
Eso es un ejemplo de como mandar un request sin JSON concatenado los varoles en la URL mediante GET.
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
<? php | |
function orderStatus($data_0, $data_1, $data_2, $data_3, $data_4, $data_5, $data_6, $data_7, $data_8, $data_9) { | |
$payload = 'x_account_id=' . $data_1 . '&x_reference=' . $data_2 . '&x_currency=' . $data_3 . '&x_test=' . $data_4 . '&x_amount=' . $data_5 . '&x_gateway_reference=' . $data_6 . '&x_timestamp=' . $data_7 . '&x_result=' . $data_8 . '&x_signature=' . $data_9; | |
$session = curl_init(); | |
curl_setopt($session, CURLOPT_URL, $data_0); // $putUrl | |
curl_setopt($session, CURLOPT_CONNECTTIMEOUT, 30); | |
curl_setopt($session, CURLOPT_TIMEOUT, 30); | |
curl_setopt($session, CURLOPT_HEADER, true); | |
curl_setopt($session, CURLOPT_RETURNTRANSFER,true); | |
curl_setopt($session, CURLOPT_CUSTOMREQUEST, 'GET'); | |
curl_setopt($session, CURLOPT_HTTPHEADER, array('X-HTTP-Method-Override: GET')); | |
curl_setopt($session, CURLOPT_POSTFIELDS, $payload); | |
$shopify_response = curl_exec($session); | |
curl_close($session); | |
//echo $shopify_response; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment