1
<?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" => '[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());
}
?>
我使用的是測試樣本數據:Sample Test Data的2Checkout - 捲曲失敗的錯誤沙盒
我的賣家ID:901275831
現在怎麼辦?我正在首次測試它。但不知道爲什麼會發生此錯誤。有沒有人可以幫忙?