areto api payment gateway -
i trying implement areto api payment gateway, return response authentication error such :- authentication failed - invalid id/session/ip combination. try first time implement (this type) payment gateway. how implement areto api payment gateway. have use code this:- https://pay.aretosystems.com/api/sale/v1'; $api_session = 'zxukwkg97wcedyybzxnbgfoutvj5qdo7ywayxt5t9cabpmn4tamzuph0hgtdin6b'; $api_id = '6mk+kxq5dadlu+4qnxpy3jth/hg56agmhhpomwxp0/tcmbe6ohxzkg/qrje/dnjq';
$transaction = array( "authentication" => array( "id" => $api_id, "session" => $api_session ), "order" => array( "orderid" => "testsale", "amount" => "0.01", "currencycode" => "eur" ), "carddetails" => array( "ccvc" => "123", "ccexpirymonth" => "01", "ccexpiryyear" => "2017", "ccname" => "wdp", "ccsurname" => "tech", "ccnumber" => '4200000000000000', "cctype" => "visa", "ccadress" => "542, surya nagar", "clientcity" => "jaipur", "clientcountrycode" => "us", "clientzip" => "302017", "clientemail" => "wdpjaipur@gmail.com", "clientexternalidentifier" => "mytestusername1", "clientip" => "162.158.50.205", "clientphone" => "1234567890" ) ); $data_string = json_encode($transaction); $ch = curl_init(); curl_setopt($ch, curlopt_post, 1); curl_setopt($ch, curlopt_ssl_verifypeer, 0); curl_setopt($ch, curlopt_ssl_verifyhost, 0); curl_setopt($ch, curlopt_url, $url); curl_setopt($ch, curlopt_httpheader, array( 'accept: application/json', 'content-type: application/json', 'content-length: ' . strlen($data_string)) ); curl_setopt($ch, curlopt_postfields, $data_string); curl_setopt($ch, curlopt_returntransfer, 1); $response = curl_exec($ch); $http_status = curl_getinfo($ch, curlinfo_http_code); curl_close($ch); $http_status . php_eol; $responcedata = json_decode($response, true); echo '<pre>'; print_r($responcedata);die; ?>
this part of api not documented, after found question able find way solve problem: key have properties want send concatenated string divided &
characters , send them plain text via post.
if want try out in postman:
1) enter properties url parameters
2) copy string url
3) , paste in request body, setting type plain text.
Comments
Post a Comment