Stripe仅收取金额的1%-测试模式 [英] Stripe is charging only 1% of the amount - test mode
问题描述
我正在实施Stripe Connect来向客户收取费用,然后将佣金转移到另一个关联的帐户,但是我却停留在第一步。
I am implementing Stripe connect to charge a customer and then transfer commission to another associated account but I am stuck at the first step.
我已经成功获取了卡的详细信息的客户并使用stripe.js,我已经对其进行了令牌化,然后将该令牌交换为我保存在数据库中的客户ID。
I have successfully taken card details of the customer and using stripe.js, I have tokenized it and then exchanged that token for a customer id which I saved in my DB.
现在我正在使用收费:
$charge = \Stripe\Charge::create([
"amount" => 774,
"currency" => "usd",
"customer" => $customerId,
"transfer_group" => $uniqueTransferString
]);
现在实际支付的金额是$ 7.74,而不是$ 774.00,我不知道为什么。当然,我在测试模式下使用所有东西。
Now that actually makes payment of $7.74 instead of $774.00 and I have no idea why. Of course I am using everything in test mode.
我最初用来创建客户的卡是:4242 4242 4242 4242
The card I used to create the customer at the first place was: 4242 4242 4242 4242
我尝试给出的费用金额为:1000、774.00等,但是每次只收取给定金额的1%。
I have tried to give charge amount as: 1000, 774.00 etc but every time it only charges 1% of the given amount.
我已经搜索了,但是找不到任何帮助,好像为什么会发生这种情况。
I have searched but couldn't find help anywhere as if why is this happening.
请帮助。
推荐答案
条带始终以货币最低金额起作用。因此,以美元计将是美分。
Stripe always work in a currencys lowest amount. So in dollars that would be cents.
这意味着要向f.ex收取1美元,您需要将其乘以100。这就是100,即您通过的金额
That mean to charge f.ex 1$ you need to multiply it by 100. This gives you 100 which is the amount you pass to stripe.
要收取774 $,您需要在条纹数量字段中传递77400
In your case to charge 774$ you would need to pass 77400 in stripes amount field
这篇关于Stripe仅收取金额的1%-测试模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!