updateSync Function Route Address
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!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 11
- Joined: 14 Jun 2021, 05:59
updateSync Function Route Address
Hi
Iam working on aimeos/laravel version (on php 7.4).
I need to verify payments on web application after SCA payment is done by client(ReactJs).
So I have to call a Webservice to tell Aimeos to change the payment status .
Aimeos has a function called updateSync on payment providers for this .
But my problem is I could not find a Route Address or a Function calling it.
I don’t know how should i call it . Searched docs but did't help.
Much appreciated your time and if this is not Aimeos related - please feel free to point out at the concept or relevant documentation.
Iam working on aimeos/laravel version (on php 7.4).
I need to verify payments on web application after SCA payment is done by client(ReactJs).
So I have to call a Webservice to tell Aimeos to change the payment status .
Aimeos has a function called updateSync on payment providers for this .
But my problem is I could not find a Route Address or a Function calling it.
I don’t know how should i call it . Searched docs but did't help.
Much appreciated your time and if this is not Aimeos related - please feel free to point out at the concept or relevant documentation.
Re: updateSync Function Route Address
The updatePush() method might be more suitable as there's a route for that. The updateSync() method is automatically called if the user opens the checkout confirmation page in his browser.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: updateSync Function Route Address
Here's the route for the checkout update component that will call updatePush():
https://github.com/aimeos/aimeos-larave ... #L140-L150
You can use this to generate the URL for this route:
https://github.com/aimeos/aimeos-larave ... #L140-L150
You can use this to generate the URL for this route:
Code: Select all
route('aimeos_shop_update')
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: updateSync Function Route Address
ok, I finally did the updatePush method for my project. I can update the Aimeos documentation with a quick step-by-step example if you need. What is the best way to do this?aimeos wrote: ↑26 Jun 2021, 06:57 You can use this to generate the URL for this route:Code: Select all
route('aimeos_shop_update')
Re: updateSync Function Route Address
Good idea! You can create a PR in https://github.com/aimeos/aimeos-docs for:
https://github.com/aimeos/aimeos-docs/b ... e/index.md
https://github.com/aimeos/aimeos-docs/b ... e/index.md
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
- MattWoodward
- Posts: 20
- Joined: 03 Mar 2022, 04:15
Re: updateSync Function Route Address
Currently looking for an example of using UpdatePush where this can be called externally and have variables passed in (e.g. order_id, status etc) - was the above example ever provided? I cant see a PR in GitHub for it?
Re: updateSync Function Route Address
There was no PR yet. Also "route('aimeos_shop_update')" is Laravel specific if the URL should be generated from outside of Aimeos. Within an Aimeos payment service provider, the "update" URL is automatically injected here:
https://github.com/aimeos/aimeos-core/b ... #L124-L143
https://github.com/aimeos/aimeos-core/b ... #L124-L143
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
- MattWoodward
- Posts: 20
- Joined: 03 Mar 2022, 04:15
Re: updateSync Function Route Address
Fair enough, thanks for updating. When I echo'd the route it appears this is the root of the site by default.
So would a PSR-7 HTTP POST request (to the root site address) (and all variables / content) simply be routed directly to the UpdatePush implementation within all providers?
Code: Select all
'routes' => [
// Docs: https://aimeos.org/docs/latest/laravel/extend/#custom-routes
// Multi-sites: https://aimeos.org/docs/latest/laravel/customize/#multiple-shops
'admin' => ['domain' => '{site}', 'prefix' => 'admin', 'middleware' => ['web']],
'jqadm' => ['domain' => '{site}', 'prefix' => 'admin/jqadm', 'middleware' => ['web', 'auth']],
'jsonadm' => ['domain' => '{site}', 'prefix' => 'admin/jsonadm', 'middleware' => ['web', 'auth']],
'jsonapi' => ['domain' => '{site}', 'prefix' => 'jsonapi', 'middleware' => ['web', 'api']],
'account' => ['domain' => '{site}', 'prefix' => 'profile', 'middleware' => ['web', 'auth']],
'default' => ['domain' => '{site}', 'prefix' => 'shop', 'middleware' => ['web']],
'update' => ['domain' => '{site}'],
],
- MattWoodward
- Posts: 20
- Joined: 03 Mar 2022, 04:15
Re: updateSync Function Route Address
Or am I reading this wrong, and the "update page" is actually at:
https:<site root>/shop/checkout/update
If so, is this where the HTTP POST request should be sent from the delivery provider?
https:<site root>/shop/checkout/update
If so, is this where the HTTP POST request should be sent from the delivery provider?