Jump to content

I want to develop new payment module


tolito

Recommended Posts

Hello Colleagues,

I would like to develop a new module for PrestaShop. I want to support payment gateway which is already supported from non-free module. I want to create new module from scratch. First it will be for fun and second I want to get some experience in prestashop modules development.

 

I already read development guide. Is there other document which describes how to create module for payment gateway? I tried to red PayPal module but it is too complicated. I need something simpler to start with.

 

Also, could you recommend me simple payment module read it as a reference.

 

Thanks in advance mates! Just give me a direction and I am going to digging there :)

Link to comment
Share on other sites

for the first check the simple module like cod or bankwire

you will see how to develop simple payment method

 

then you will be able to append there own functions to handle for example your payment method api etc.

Link to comment
Share on other sites

Payment gateway is epay.bg. It is used mostly in Bulgaria. There is non-free module for this gateway but it cost 30 EURO. My module already has an icon and it is installable :) just few more hours work and it will be ready! Thanks for your help!

Link to comment
Share on other sites

I have the API implemented as a php class. I implemented it 2 years ago for other product but it can be reused here very easy. I got bankwire and changed it it fit my needs. Now I have to implement redirect to epay.bg and should prepare special "back to shop" page when the end user confirm payment or cancel it on the epay.bg site. Also I should prepare special interface where epay.bg will post payment progress after some time.

 

I am going to ask if I found something difficult and I hope you will help me :)

Link to comment
Share on other sites

i don't know how the epay.bg works, hope i understood you well,

where you want to redirect the customer ? and for what purposes (i suppose that for payment form on the epay website)

 

PayPal redirects customer to the paypal payment page with <form>

i think that in this case it is similar

Link to comment
Share on other sites

The way epay.bg works is very similar to paypal. After the user choose payment methond (epay.bg) he should be redirected to epay.bg website. There he may see the order, how it cost, etc and can do the payment or can cancel it. After one of these to action he will be redirected back to the shop. After some time when the payment really completed epay.bg should send post request to our shop information about the payment (and it is really completed only after this request). This request may come in the nest 24 hours....

Link to comment
Share on other sites

Today I found 2 hours and I manage to cmoplete the special form with encoded data to epay.bg gateway. It was easy because I have already tested Class for this.

Now I have to move forward. epay.bg gateway wants to send to my shop the status of the payment. It could be for example 2 hours after the user already did it. Where I have to add code for this? Obviously if the payment is successful I have to change the state for this order to "paid". How can I do it?

Link to comment
Share on other sites

  • 2 months later...
  • 5 years later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...