После установки пакета, который загружается из этого github.«cUrl call failed» с использованием 2checkout
https://github.com/2checkout/2checkout-php
require_once("lib/Twocheckout.php");
Twocheckout::privateKey('privatekey'); //Private Key
Twocheckout::sellerId('sellerid'); // 2Checkout Account Number
// If you want to turn off SSL verification (Please don't do this in your production environment)
Twocheckout::verifySSL(false); // this is set to true by default
// To use your sandbox account set sandbox to true
Twocheckout::sandbox(true);
// All methods return an Array by default or you can set the format to 'json' to get a JSON response.
Twocheckout::format('json');
try {
$charge = Twocheckout_Charge::auth(array(
"merchantOrderId" => "123",
"token" => $_POST['token'],
"currency" => 'USD',
"total" => '10.00',
"billingAddr" => array(
"name" => 'Joe Flagster',
"addrLine1" => '123 Main Street',
"city" => 'Townsville',
"state" => 'OH',
"zipCode" => '43206',
"country" => 'USA',
"email" => '[email protected]',
"phoneNumber" => '555-555-5555'
)
));
if ($charge['response']['responseCode'] == 'APPROVED') {
echo "Thanks for your Order!";
echo "<h3>Return Parameters:</h3>";
echo "<pre>";
print_r($charge);
echo "</pre>";
}
} catch (Twocheckout_Error $e) {
print_r($e->getMessage());
}
После отправки формы с помощью изолированном режиме он показывает ошибку, как «Curl Сбой вызова». Как исправить это
Спасибо за ответ ... –