<?php
$pass='***************';
$params['card_exp_month'] = '11action']='DEBIT_PREPARE';
$params['cardclient_exp_yearkey'] = '1111'******';
$params['cardorder_cvv2id'] = '111'Platon_test_37254'.rand(100, 999);
$params['payerorder_first_nameamount']='Jack10.00';
$params['payerorder_last_namecurrency']='AndersonUAH';
$params['payerorder_phonedescription']='380962111111test_by_Platon';
$params['payercard_addressnumber'] = 'NA1111111111111111';
$params['payercard_exp_countrymonth'] = 'UA11';
$params['payercard_exp_stateyear'] = 'NA1111';
$params['payercard_citycvv2'] = 'NA111';
$params['payer_zipfirst_name']='01001Jack';
$params['payer_emaillast_name']='test@test.comAnderson';
$params['payer_ipphone']='111.111.111.111380962111111';
$params['termpayer_url_3dsaddress']='https://google.comNA';
$params['signaturepayer_country'] = sha1($pass . strtolower(implode('', $params)))'UA';
$params['payer_state']='NA';
$params['payer_city']='NA';
$url = 'https://secure.platononline.com/p2p-debit/$params['payer_zip']='01001';
$tempData = array();
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_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) {
curl_setopt($crq, CURLOPT_SSL_VERIFYHOST, 0$tempData[] = $key.'='.urlencode($value);
curl_setopt($crq, CURLOPT_SSL_VERIFYPEER, 0}
$crq = curl_init();
curl_setopt($crq, CURLOPT_POSTFIELDSURL, implode('&', $tempData));
$url);
$result = curl_execsetopt($crq, CURLOPT_HEADER, 0);
if (curl_errnosetopt($crq)) {
, CURLOPT_RETURNTRANSFER, 1);
echo 'ERROR: '.curl_errorsetopt($crq, CURLOPT_SSL_VERIFYHOST, 0);
} curl_closesetopt($crq);
echo $result, CURLOPT_SSL_VERIFYPEER, 0);
$moda = json_decode($result, true);curl_setopt($crq, CURLOPT_POSTFIELDS, implode('&', $tempData));
$result $pars['action']='DEBIT_RUN'= curl_exec($crq);
$pars['client_key']='7Y0Y8RCGG5'; $pars['trans_id']=$moda['trans_id'];
$pars['signature']= sha1($pass . strtolower(implode('', $pars)));;if (curl_errno($crq)) {
echo 'ERROR: '.curl_error($crq);
}
$temp = arraycurl_close($crq);
echo foreach$result;
($pars as $key$moda => $value) { json_decode($result, true);
$temp[] = $key.'='.urlencode($value);
}
$crq = curl_init();
curl_setopt($crq, CURLOPT_URL, $url);
curl_setopt($crq, CURLOPT_HEADER, 0);
curl_setopt($crq, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($crq, CURLOPT_SSL_VERIFYHOST, 0$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 ($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_execsetopt($crq, CURLOPT_RETURNTRANSFER, 1);
if (curl_errnosetopt($crq)) {
, CURLOPT_SSL_VERIFYHOST, 0);
echo 'ERROR: '.curl_error($crq);
}curl_setopt($crq, CURLOPT_SSL_VERIFYPEER, 0);
curl_closesetopt($crq);
echo $res;
$respRedirect = json_decode($res, true);
echo $respRedirect['redirect_url'];
header('Location: '.$respRedirect['redirect_url']);
?> |