anonymousdev Posted April 4, 2022 Share Posted April 4, 2022 I'm using prestashop 1.7. and I'm trying to make an external payment gateway where i have been provided with api url, request response, api key, password etc. I have made till the configure page but have no idea how to proceed further inorder to redirect my customers to gateway page and then return them back to order page based on order success or fail. I have no idea where to place request response or what is the correct way to write since I'm new to presta. Can anybody help me with this problem? It will be a big help for me as I'm stuck for almost 3 days now. I will share the code for better understanding if asked. thanks in advance! Link to comment Share on other sites More sharing options...
Janett Posted April 4, 2022 Share Posted April 4, 2022 Look at https://github.com/PrestaShop/paymentexample Link to comment Share on other sites More sharing options...
anonymousdev Posted April 6, 2022 Author Share Posted April 6, 2022 (edited) Hey thanks for replying. Already I have tried to write code using this github file. But there also I could not find a solution of adding return URL/ success url / how to pass request response parameters/ api url /. Upon clicking place order button, it takes me to gateway url without validating order. check the screenshot. below. correct me if i missed something. thanking you in advance! Edited April 11, 2022 by anonymousdev (see edit history) Link to comment Share on other sites More sharing options...
AEHanson Posted August 4, 2022 Share Posted August 4, 2022 Please, I want to define my action url so that it will direct my customer to my choice payment system, I can't seem to get it. in that the url I supplied, my pretsahop application is adding a directory to it. How can I set the action url? Please someone help me, I have been here for over a week now. Link to comment Share on other sites More sharing options...
AEHanson Posted August 4, 2022 Share Posted August 4, 2022 Please help me, How did you direct your customer to an external payment system outside prestashop, I can't seem to get it right with my action url definition. How did you define the action variable in the payment class. I tried setting my action setter function like this, for instance, but it will not move through. It is showing me "page not found error" public function getExternalPaymentOption() { $externalOption = new PaymentOption(); $externalOption->setCallToActionText($this->l('Pay to an external page before prestashop')) ->setInputs([ 'token' => [ 'name' =>'token', 'type' =>'hidden', 'value' =>'12345689', ], ]) ->setAdditionalInformation($this->context->smarty->fetch('module:MyPaymentModule/views/templates/hook/payment_infos.tpl')) ->setLogo(Media::getMediaPath(_PS_MODULE_DIR_.$this->name.'/logo.jpg')) ->setAction("www.google.com"); return $externalOption; } Link to comment Share on other sites More sharing options...
ventura Posted August 10, 2022 Share Posted August 10, 2022 https://devdocs.prestashop.com/1.7/modules/payment/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now