Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 579 Vote(s) - 3.52 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Modifying the checkout process in Prestashop 1.5

#1
A client of us has developed a payment gateway, similar to PayPal. He wants a module for Prestashop, for making clients to be able to pay through it.

He wants to modify the original checkout process. For example, if the user introduces a concrete postal code, the only available way to pay must be his payment gateway. Is it possible? I don't know exactly if this is allowed by the Prestashop API or even if this can be done.

Thanks in advance!
Reply

#2
Yes it is possible.
You just have to create a specific payment module with the good Hook.
Reply

#3
The best solution maybe is to create your own payment module,
You could easily extend the PaymentModule class and create your own with your own logic.

**Make a custom module**
[see Creating a payment module official documentation][1]

When you extend the PaymentModule you inherit all from the parent class, so you could add your new methods or override the inhereted ones.
Fortunally that abstract class doesn't have abstract methods, that means that just extending it you will have all the basic payment behaviour pre built in.

[Source of the PaymentModule][2]

**Hooks**
In the offical documentation about creating a payment module there is a mention for making some hooks:

- payment: to display the payment method.
- paymentReturn: to display the payment confirmation.

making that hooks is simple, just define inside your custom payment class methods named hookPayment and hookPaymentReturn.

[Hooks in Prestashop][3]


**Others useful links**
You could also have a look of some famous payment module like Paypal, to understand better how it works and having some thinking about your module.

[Prestashop Paypal Module source][4]


[1]:

[To see links please register here]

[2]:

[To see links please register here]

[3]:

[To see links please register here]

[4]:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through