没有这样的目的地 [英] No such destination

查看:43
本文介绍了没有这样的目的地的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的网站中使用 Stripe 方法.用户从我的网站购买产品并通过 Stripe 付款.我想收取我的佣金并将剩余的钱发送给服务提供商.当我尝试在条带中使用传输方法时,它会显示错误消息.

I am using Stripe method in my website. user purchase product from my site and payment done through stripe. I want to charge my commission and send rest of money to Service Provider. When i try to use transfer method in stripe it shows me Error Message.

"message": "No such destination: acct_1###############",

甚至我的帐户都添加了提供商帐户.

Even my account added with providers account.

我为此使用下面的代码

$transfer = \Stripe\Transfer::create(array(
     "amount" => 50,
     "currency" => "eur",
     "destination" => "acct_180W54CRJ51SjjGi",
     "transfer_group" => "ORDER_95"
));

请帮我解决这个问题.

推荐答案

我遇到了这个问题,因为我在整个应用程序中使用了不同的 Stripe api 测试键(我从 SO 上的其他地方复制了一个测试键).

I had this problem because I was using different Stripe api test keys across the app (I'd copied a test key from somewhere else on SO).

>

所以当我去创建付款时,stripe 在平台帐户上找不到那个连接的用户.

So when I went to create a payment, stripe couldn't find that connected user on the platform account.

为了纠正这个问题,我只是确保 Stripe 测试密钥在整个过程中保持一致(当它交付到生产环境时,我会将它设为一个 env 变量)

To correct this, I simply ensured the Stripe test key was consistent throughout (I'll make it an env variable when it ships to production)

Stripe.api_key = 'sk_test_51HYHSFGtUKse83O9J4QeAib3cp8sHzGKHAL8JdkshEzuYQKUCKEP3CHE3AIUb7fdevMK7TVAUCyJU0ADSwIUoX00qxZmBI9r'

这篇关于没有这样的目的地的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆