请告诉我如何在stripe
付款API中计算gbp费用。
当我支付77 Gbp时,它转换如下:
金额:£0.77英镑
费用:£0.22
你能帮我理解这个计算吗?
$payment = \Stripe\Charge::create(array(
'amount' => 77,
'currency' => 'gbp',
'customer' => 'cus_9pI6dChsVygOLm',
'capture' => true,
'description' => 'Testing response',
));
答案 0 :(得分:2)
当您将金额作为费用传递给Stripe时,它以美分为单位。因此,要实际充电77GBP,您需要将该数量乘以100。 请参阅Stripe文档以及它如何提及它的分数: https://stripe.com/docs/quickstart#charging-your-customer-immediately
然后费用就是Stripe根据金额向您收取的交易费用。