我正在尝试按照有关在此处创建付款的说明进行操作:
https://github.com/paypal/PayPal-Ruby-SDK
所以在我的控制器中,我有:
PayPal::SDK::REST.set_config(
:mode => "sandbox", # "sandbox" or "live"
:client_id => "*** My ID ***",
:client_secret => "*** My Secret ***"
)
@payment = Payment.new({
:intent => "sale",
:payer => {
:payment_method => "paypal" },
:redirect_urls => {
:return_url => "http://localhost:3000/checkout/complete",
:cancel_url => "http://localhost:3000/checkout/canceled" },
:transactions => [{
:item_list => {
:items => [{
:name => "item",
:sku => "item",
:price => "10",
:currency => "EUR",
:quantity => 1 }]},
:amount => {
:total => "10",
:currency => "EUR" },
:description => "This is the payment transaction description." }]})
@payment.create
目前我不知道接下来会发生什么。我有一个付款对象,我知道我必须以某种方式将它们重定向到Paypal,但是文档中缺少该部分。接下来会发生什么?