Reputation: 171
Request Data to TwoCheckOut :
Response from TwoCheckOut.
{
"error": "Bad request - parameter error"
}
Here is the Code
$charge = Twocheckout_Charge::auth(array(
"sellerId" => '*HIDDEN*',
"merchantOrderId" => $orderID,
"token" => $token,
"currency" => $currency,
"total" => $itemPrice,
"billingAddr" => array(
"name" => $name,
"addrLine1" => $addrLine1,
"city" => $city,
"state" => $state,
"zipCode" => $zipCode,
"country" => $country,
"email" => $email,
"phoneNumber" => $phoneNumber
),
"shippingAddr" => array(
"name" => 'Testing Tester',
"addrLine1" => '123 Test St',
"city" => 'Columbus',
"state" => 'OH',
"zipCode" => '43123',
"country" => 'USA',
"email" => '[email protected]',
"phoneNumber" => '555-555-5555'
),
"demo" => true
));
Althought i am getting unauthenticated if i send wrong 'token' key.
EDIT :
Feel free to drop your suggestions
Upvotes: 3
Views: 257
Reputation: 11
TCO.loadPubKey('production');
loadPubKey should be 'production' it should not be empty
Upvotes: 0
Reputation: 171
"demo" => 'Y'
Demo key should be 'Y' not true was the issue here
Upvotes: 1