cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Payment Method

Custom Payment Method

I have implemented a custom payment method pay tabs in Magento 2.3 it redirects me to the home page and gives error "Invalid form key. Please refresh the page".

 

Kindly Help.

 

 

5 REPLIES 5

Re: Custom Payment Method

Hi @anaghakotre1,

I guess you need set call back url with the response data, You need create php file for showing response data's



If my solution is useful, give kudos & accept as solution

Best regards
Madhuresan
Bootsgrid

Re: Custom Payment Method

Hi @anaghakotre1,

Can I see your return URL and code?

 

 

 

 

Best regards

madhuresan

Re: Custom Payment Method

functionlaunchPaytab() {

Paytabs('#express_checkout').expresscheckout({
settings:{
merchant_id: '". $merchantid ."',
secret_key: '". $secretkey ."',
amount : '". $amount ."',
currency : '". $currency ."',
title : '". $title ."',
product_names: '". $products ."',
order_id: '". $txnid ."',
url_redirect: '". $returnUrl ."',
display_customer_info:1,
display_billing_fields:1,
display_shipping_fields:0,
language: '". $lang ."',
redirect_on_reject: 0,
},
customer_info:{
first_name: '". $firstName ."',
last_name: '". $lastName ."',
phone_number: '". $telephone ."',
email_address: '". $email ."',
country_code: '". $phoneext ."',
},
billing_address:{
full_address: '". $street ."',
city: '". $city ."',
state: '". $region ."',
country: '". $country ."',
postal_code: '". $postcode ."',
}
});
}
";

Re: Custom Payment Method

Can you provide me mail id as i will mailed you enter module what i have created

Re: Custom Payment Method

Hi @anaghakotre1,

Ok. Thank you for the code, please check yourself with comparing api with your code. Maybe you miss some main key.

Also please check the call back url has been added on your paytab back office

If my solution is useful, give kudos & accept as solution

Best regards
madhuresan