所以我在我的应用程序中设置了条带支付选项。当我点击立即付款按钮时,它显示付款成功。当我转到我的条带帐户并转到条带测试并检查日志时,我可以看到我的测试付款代码为 200 OK。但此付款不会显示在条带测试事件或条带测试付款中。是第二天处理日志中的付款还是我做错了什么?
def charge
Stripe.api_key = "some_test_api_key"
customer = Stripe::Customer.retrieve(stripe_customer_id)
if stripe_customer_id.nil?
Stripe::Charge.create(
:amount => 2500,
:currency => "cad",
:customer => stripe_customer_id,
:description => "Usage charges for #{name}"
)
end
rescue Stripe::StripeError => e
logger.error "Stripe Error: " + e.message
errors.add :base, "Unable to process charge. #{e.message}."
false
end