<?php
require "lib/Twocheckout.php";
Twocheckout::privateKey('E33E09ED-BD17-4775-AF92-27DE266859A6');
Twocheckout::sellerId('901275831');
Twocheckout::sandbox(true);
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" => 'Ohio',
"zipCode" => '43206',
"country" => 'USA',
"email" => 'example@2co.com',
"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());
}
?>
我正在使用测试样本数据:样本测试数据
我的卖家编号: 901275831
现在要做什么?我是第一次测试它。但不知道为什么会发生此错误。有没有人可以帮忙?