' Недействительно: 3035: формат VendorTxCode недействителен.
В настоящее время я URL-кодирую фамилию перед отправкой ее в функцию createVendorTxCode:
Код: Выделить всё
$encodedSurname = urlencode(Input::get('BillingSurname'));
// Create a custom VendorTxCode. This must be unique every time.
$VendorTxCode = $this->createVendorTxCode($encodedSurname, $ids);
Код: Выделить всё
public function createVendorTxCode($lastName, $ids) {
$lesson_ids = str_replace(',', '-', $ids);
$VendorTxCode = $lastName;
$VendorTxCode .= date("-YmdHis-");
$VendorTxCode .= rand(0,32000)*rand(0,32000);
return $VendorTxCode;
}
Код: Выделить всё
public function requestPost($url, $data){
set_time_limit(60);
$output = array();
$curlSession = curl_init();
curl_setopt ($curlSession, CURLOPT_URL, $url);
curl_setopt ($curlSession, CURLOPT_HEADER, 0);
curl_setopt ($curlSession, CURLOPT_POST, 1);
curl_setopt ($curlSession, CURLOPT_POSTFIELDS, $data);
curl_setopt($curlSession, CURLOPT_RETURNTRANSFER,1);
curl_setopt($curlSession, CURLOPT_TIMEOUT,30);
curl_setopt($curlSession, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curlSession, CURLOPT_SSL_VERIFYHOST, 2);
$rawresponse = curl_exec($curlSession);
$_SESSION["rawresponse"]=$rawresponse;
$response = explode(chr(10), $rawresponse);
// Check that a connection was made
if (curl_error($curlSession)){
$output['Status'] = "FAIL";
$output['StatusDetail'] = curl_error($curlSession);
}
curl_close ($curlSession);
for ($i=0; $i string(4) "2.23" ["Status"]=> string(7) "INVALID" ["StatusDetail"]=> string(42) "3035 : The VendorTxCode format is invalid." }
Будем очень признательны за любую помощь или информацию. Спасибо.
Подробнее здесь: https://stackoverflow.com/questions/277 ... ode-issues
Мобильная версия