问题描述
我正在使用Braintree SandBox,每当我尝试付款时,我都会收到DropIn的错误消息,说:
名称:“ DropinError”,消息:“没有可用的付款方式。”, _braintreeWebError:未定义
我做了什么以证明自己一切都很好:
在选择Braintree付款方式后,我页面的最终结果是:
它说没有可用的付款方式,但是我可以看到“ Card”和“ Paypal” UI的付款方式,但是我不能全都不用。
$gateway = new \Braintree\Gateway(
[
'merchantId' => env('BRAINTREE_MERCHANT_ID'),'publicKey' => env('BRAINTREE_PUBLIC_KEY'),'privateKey' => env('BRAINTREE_PRIVATE_KEY'),'environment' => env('BRAINTREE_ENVIRONMENT')
]);
$token = $gateway->clientToken()->generate();
然后用Java语言做的就是:
// Double checked,its ok!
var token = $('#braintree_token').val();
braintree.dropin.create(
{
authorization: token,container: '#braintree-container',paypal:
{
flow: 'vault',}
},function(err,instance)
{
// Error starts after this call
instance.requestPaymentMethod(function(err,payload)
{
// Never reaches here!
console.log(payload);
},'json');
});
我想念什么?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)