Home » Php » Paytabs payment gateway Api not working

Paytabs payment gateway Api not working

Posted by: admin June 30, 2018 Leave a comment

Questions:

I am using the Paytabs payment gateway. Using the rest API Validate Secret Key providing all parameter but API returns every time in “missing parameter merchant_email” message.

 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}
Answers: