Php 2支票退款问题
使用,我在使用他们提供的示例和我自己的凭据,通过他们的API在他们的沙箱中进行退款时遇到问题。我做错了什么?请注意,我可以在他们的沙箱中进行收费,但不能退款Php 2支票退款问题,php,payment-gateway,2checkout,Php,Payment Gateway,2checkout,使用,我在使用他们提供的示例和我自己的凭据,通过他们的API在他们的沙箱中进行退款时遇到问题。我做错了什么?请注意,我可以在他们的沙箱中进行收费,但不能退款 <?php error_reporting(E_ALL); ini_set('display_errors','On'); header('Content-Type: text/plain'); require_once('lib/Twocheckout.php'); $sChargeID = '4093729353592';
<?php
error_reporting(E_ALL);
ini_set('display_errors','On');
header('Content-Type: text/plain');
require_once('lib/Twocheckout.php');
$sChargeID = '4093729353592'; // my order ID
Twocheckout::username('USER'); // my username
Twocheckout::password('PASSWORD'); // my password
Twocheckout::sandbox(true);
Twocheckout::verifySSL(false);
$charge = Twocheckout_Sale::refund(array(
'sale_id' => $sChargeID,
'comment' => 'Customer decided the item did not meet expectations and it was within their refund period.',
'category' => 2 // did not like item
));
echo "\nRESPONSE = \n";
print_r($charge);
echo "\n";
关于API退款,有几件事他们没有向2Checkout说得太清楚:
正是这种圈套使得2Checkout不如Stripe吸引人,但嘿,很少有服务能像Stripe这样提供快速登录和基于代币的支付。2 Heckout是我的“第二好选择”谢谢,你刚刚帮我省了几个小时!
{
"errors" : [
{
"code" : "FORBIDDEN",
"message" : "Access denied to API"
}
]
}