After successful payment callback function

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Dhara1510
Posts: 15
Joined: 27 Apr 2019, 05:36

After successful payment callback function

Post by Dhara1510 » 27 Apr 2019, 05:42

Hello All,

Thanks for your awesome package!!

I have used aimeos on my Skelton laravel application.

I have configured the skeleton application database and aimeos database differently but install on the same laravel installation with the different subdomain.

Once a new user successfully payment in subscription, I need to update user some information on skeleton application database. I can use any callback API or callback function to achieve

Can you guide me on how to achieve this #feature?

Environment is Linux.

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

Re: After successful payment callback function

Post by aimeos » 29 Apr 2019, 09:26

Aimeos only uses one "users" table and you have to configure the "db-customer" resource in your ./config/shop.php file to point to your default Laravel database (run ./artisan aimeos:setup afterwards to update the table).

Then, it's pretty easy to update user information. At which point in time do you want to update what information? After the order is stored, payed or delivery is in progress?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Dhara1510
Posts: 15
Joined: 27 Apr 2019, 05:36

Re: After successful payment callback function

Post by Dhara1510 » 30 Apr 2019, 08:58

I want to update user information after successful payment. Is there a method by which I do not need to update core functions and do it in my controller?

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

Re: After successful payment callback function

Post by aimeos » 30 Apr 2019, 09:12

You can add your own code in the updateSync() method of a service provider decorator for the payment provider you have configured: https://aimeos.org/docs/Developers/Library/Service

Then, add your decorator here: https://aimeos.org/docs/User_Manual/Adm ... ce_details
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Dhara1510
Posts: 15
Joined: 27 Apr 2019, 05:36

Re: After successful payment callback function

Post by Dhara1510 » 30 Apr 2019, 12:57

I am using the default Payment Provider given in core setup. As you said I can use updateSync() method for my custom code. I only want to add one database entry when subscription created. So is it fine to use it in Base file of extension?

Is it will overwrite when I do composer update?

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

Re: After successful payment callback function

Post by aimeos » 01 May 2019, 09:14

Like mentioned in the other thread, a subscription processor is better for your use case.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply