【发布时间】:2018-05-24 06:00:14
【问题描述】:
我正在使用 Paytabs 支付网关。使用其余 API 验证密钥提供所有参数,但 API 每次都会在 “缺少参数的商家电子邮件” 消息中返回。
result = HTTParty.post("https://www.paytabs.com/apiv2/validate_secret_key",
:body=>{merchant_email: params[:merchant_email],
merchant_secretKey: params[:secret_key]}.to_json,
:headers => { 'Content-Type' => 'application/json',
'Accept' =>'application/json' } )
render :json => {:code=>345, :result => result}
【问题讨论】:
-
为什么这个 API 会给出这个消息 { parsed_response={"result"=>"missing Merchant_email parameter", "response_code"=>"4001"}}
-
因为这个API支持php语言。我通过 HTTParty 方法在 Rails 应用程序上使用此 API。
标签: php ruby-on-rails ruby-on-rails-3 ruby-on-rails-4 paytabs