<?php
$pass='***************';
$params['payer_last_nameaction']='AndersonDEBIT_PREPARE';
$params['payerclient_phonekey']='380962111111******';
$params['payerorder_addressid']='NA'Platon_test_37254'.rand(100, 999);
$params['payerorder_countryamount']='UA10.00';
$params['payerorder_statecurrency']='NAUAH';
$params['payerorder_citydescription']='NAtest_by_Platon';
$params['payercard_zipnumber'] = '010011111111111111111';
$params['payercard_exp_emailmonth'] = 'test@test.com11';
$params['payercard_exp_ipyear'] ='111.111.111.111 '1111';
$params['termcard_url_3dscvv2'] ='https://google.com '111';
$params['signaturepayer_first_name']='Jack';
= sha1($pass . strtolower(implode('', $params)));
$url = 'https://secure.platononline.com/p2p-debit/ $params['payer_last_name']='Anderson';
$params['payer_phone']='380962111111';
$params['payer_address']='NA';
$tempData = array() $params['payer_country']='UA';
$params['payer_state']='NA';
foreach ($params as $key => $value) {
$tempData[] = $key.'='.urlencode($value);
}
$crq = curl_init();
curl_setopt($crq, CURLOPT_URL, $url);
curl_setopt($crq, CURLOPT_HEADER, 0$params['payer_city']='NA';
$params['payer_zip']='01001';
$params['payer_email']='test@test.com';
$params['payer_ip']='111.111.111.111';
$params['term_url_3ds']='https://google.com';
$params['signature'] = sha1($pass . strtolower(implode('', $params)));
$url = 'https://secure.platononline.com/p2p-debit/';
$tempData = array();
curl_setopt($crq, CURLOPT_RETURNTRANSFER, 1);foreach ($params as $key => $value) {
$tempData[] = $key.'='.urlencode($value);
}
$crq = curl_setopt($crq, CURLOPT_SSL_VERIFYHOST, 0init();
curl_setopt($crq, CURLOPT_SSL_VERIFYPEERURL, 0$url);
curl_setopt($crq, CURLOPT_POSTFIELDSHEADER, implode('&', $tempData)0);
$result = curl_execsetopt($crq, CURLOPT_RETURNTRANSFER, 1);
if (curl_errnosetopt($crq)) {
, CURLOPT_SSL_VERIFYHOST, 0);
echo 'ERROR: '.curl_errorsetopt($crq, CURLOPT_SSL_VERIFYPEER, 0);
}
curl_closesetopt($crq, CURLOPT_POSTFIELDS, implode('&', $tempData));
echo $result;
$moda = jsoncurl_decode($result, trueexec($crq);
$pars['action']='DEBIT_RUN';
$pars['client_key']='*******';
$pars['trans_id']=$moda['trans_id'];
$pars['card_cvv2']='111';
$pars['signature']= sha1($pass . strtolower(implode('', $pars)));;
$temp = array(if (curl_errno($crq)) {
echo 'ERROR: '.curl_error($crq);
}
curl_close($crq);
echo foreach$result;
($pars as $key$moda => $value) {
$temp[] = $key.'='.urlencode($value);
}
$crq = curl_init();
curl_setopt($crq, CURLOPT_URL, $url);
curl_setopt($crq, CURLOPT_HEADER, 0 json_decode($result, true);
$pars['action']='DEBIT_RUN';
$pars['client_key']='*******';
$pars['trans_id']=$moda['trans_id'];
$pars['card_cvv2']='111';
$pars['signature']= sha1($pass . strtolower(implode('', $pars)));
$temp = array();
foreach curl_setopt($crq, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($crq, CURLOPT_SSL_VERIFYHOST, 0);
$pars as $key => $value) {
$temp[] = $key.'='.urlencode($value);
}
$crq = curl_init();
curl_setopt($crq, CURLOPT_SSL_VERIFYPEERURL, 0$url);
curl_setopt($crq, CURLOPT_POSTFIELDSHEADER, implode('&', $temp))0);
$res = curl_exec($crqcurl_setopt($crq, CURLOPT_RETURNTRANSFER, 1);
if (curl_errnosetopt($crq)) {
, CURLOPT_SSL_VERIFYHOST, 0);
echo 'ERROR: '.curl_errorsetopt($crq, CURLOPT_SSL_VERIFYPEER, 0);
}
curl_close($crqcurl_setopt($crq, CURLOPT_POSTFIELDS, implode('&', $temp));
$res echo $res;= curl_exec($crq);
$respRedirect =if json(curl_decode($res, true);
errno($crq)) {
echo $respRedirect['redirect_url']; echo header('LocationERROR: '.$respRedirect['redirect_url']);
?> |