我想將PayuMoney支付網關集成到我的Rails應用程序中。而且我想用付款請求重定向到支付網關URL,因此我使用HTTparty重定向並POST請求以支付貨幣URL。重定向到後付款的付款網址
我的控制器:
class ClientFeePaymentsController < ApplicationController
include HTTParty
def fee_payment
uri = URI('https://test.payu.in/_payment.php')
res = Net::HTTP.post_form(uri, 'key' => 'fddfh', 'salt' => '4364')
puts res.body
end
end
路線:
resources :client_fee_payments do
collection do
get :fee_payment
post :fee_payment
end
end
當我運行此我得到了,
Missing template client_fee_payments/fee_payment, application/fee_payment with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :axlsx, :jbuilder]}.
你找到了一個解決方案? – Abhilash