【发布时间】:2015-05-13 04:22:17
【问题描述】:
我正在使用 Stripe 进行付款。我想将资金转给其他人 条纹用户。我的帐户不在美国。
begin
Stripe::Charge.create(
:amount => amount_in_cents(amount),
:currency => DEFAULT_CURRENCY,
:customer => client.payment_token,
:description => session_or_purchase.payment_description
)
rescue Stripe::CardError, Stripe::InvalidRequestError, Stripe::APIConnectionError, Stripe::StripeError => e
body = e.json_body
err = body[:error]
return err
rescue => e
error = {type: 'Unknown', message: 'Some thing else happened ', param: ''}
end
有什么方法可以代表其他用户向我的客户收费?我必须在每笔交易中传递应用程序 API 密钥,并且所有付款都转到应用程序帐户,但我想向用户转帐并扣除一些金额:即应用程序费用到我的应用程序帐户。
【问题讨论】:
标签: ruby-on-rails user-controls payment-gateway stripe-payments stripe-connect