AI-Payments extent

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Yvler
Posts: 33
Joined: 04 Jun 2015, 10:15

AI-Payments extent

Post by Yvler » 24 Sep 2015, 14:48

Hi

Is there a way to extend the "process" function of AI-Payments?
We would like to make an invoice PDF after the payment has been received per order :).
At this moment we're using the Omnipay (Ogone/Ingenico implement) class of AI-Payments to handle all our payments for our orders :)

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: AI-Payments extent

Post by aimeos » 24 Sep 2015, 20:08

Yvler wrote: Is there a way to extend the "process" function of AI-Payments?
We would like to make an invoice PDF after the payment has been received per order :).
That's the wrong place because the process method can executed several times due to asynchronous notifications by the payment provider. The best way would be to implement a new subpart for the checkout confirm component or at least add a link there which would generate the PDF.

We would be glad of any PR regarding this ;)

Yvler
Posts: 33
Joined: 04 Jun 2015, 10:15

Re: AI-Payments extent

Post by Yvler » 28 Sep 2015, 10:20

Is there already a function which is called after the payment has been received?
The order doesn't have to be delivered, because we use these invoice pdf's also for packing the orders..

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: AI-Payments extent

Post by aimeos » 29 Sep 2015, 15:16

Yvler wrote:Is there already a function which is called after the payment has been received?
The order doesn't have to be delivered, because we use these invoice pdf's also for packing the orders..
If you want to create and store the invoice immediately after the payment notification was received, you could create a decorator for the updateSync() method of the payment provider if it returns the order item. You have to check if the payment status is PAY_AUTHORIZED or PAY_RECEIVED (value >= 5).

Post Reply