我想在我的网站上接受德沃拉付款。我正在使用Php,目前收到的错误消息是" error : Access为空“。不知道我做错了什么。
将用户发送到德沃拉登录。
$apiKey = "mykey";
$apiSecret = "mysecret";
$Dwolla = new DwollaRestClient($apiKey, $apiSecret);
$url = $Dwolla->getAuthUrl();
header("Location: {$url}");这会将用户发送到德沃拉,并让他们登录。然后我将它们重定向到我的页面,并且它确实有一个作为get字符串发送的代码值。所以我试着把钱寄出去。
$code = $_GET['code'];
$apiKey = "mykey";
$apiSecret = "mysecret";
$Dwolla = new DwollaRestClient($apiKey, $apiSecret);
$token = $Dwolla->requestToken($code);
$Dwolla->setToken($token);
$pin = $_SESSION['dwolla_pin'];
$destination = 'reflector@dwolla.com';
$amount = $_SESSION['dwolla_amount'];
$notes = 'Testing';
unset($_SESSION['dwolla_amount']);
unset($_SESSION['dwolla_pin']);
$tid = $Dwolla->send($pin, $destination, $amount, $notes);我真的需要帮助,谢谢!
发布于 2013-09-07 16:09:30
我知道答案了。启用调试模式并获得输出,这将帮助您完成进行更正的过程。此外,我必须特别设置我的uri!
$Dwolla = new DwollaRestClient($apiKey, $apiSecret, $uri);
$Dwolla->setDebug(true);https://stackoverflow.com/questions/18669391
复制相似问题