我想将 PayuMoney 支付网关集成到我的 rails 应用程序中。我想通过发布请求重定向到支付网关 URL,所以我使用 HTTparty 重定向和 POST 请求到 payumoney 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]}.