I want to integrate Twocheckout on my website i successfully generate token for payment by using the same procedure as define here https://www.2checkout.com/documentation/payment-api/create-token After this i got exceptin while making charge request i know this error is for privatekey or seller id or token,privatekey and seller id is same as for getting token request and token is also passing for this request i am using this library for charge request https://github.com/2Checkout/2checkout-php this is my charge request code .
Twocheckout::privateKey('****************');
Twocheckout::sellerId('*******');
Twocheckout::sandbox(true);
try {
$charge = Twocheckout_Charge::auth(array(
"sellerId" => "********",
"merchantOrderId" => "123",
"token" => $request->get('token'),
"currency" => 'USD',
"total" => '10.00',
"billingAddr" => array(
"name" => 'Testing Tester',
"addrLine1" => '123 Test St',
"city" => 'Columbus',
"state" => 'OH',
"zipCode" => '43123',
"country" => 'USA',
"email" => 'testingtester@2co.com',
"phoneNumber" => '555-555-5555'
),
"shippingAddr" => array(
"name" => 'Testing Tester',
"addrLine1" => '123 Test St',
"city" => 'Columbus',
"state" => 'OH',
"zipCode" => '43123',
"country" => 'USA',
"email" => 'testingtester@2co.com',
"phoneNumber" => '555-555-5555'
)
));
if ($charge['response']['responseCode'] == 'APPROVED') {
echo "Thanks for your Order!";
}
} catch (Twocheckout_Error $e) {
print_r($e->getMessage());
}
via waqas asif