updateSync Function Route Address

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!
User avatar
MattWoodward
Posts: 20
Joined: 03 Mar 2022, 04:15

Re: updateSync Function Route Address

Post by MattWoodward » 17 Mar 2022, 05:55

If I try to send a POST request to this location I currently get a HTTP 419 Page Expired response.

User avatar
MattWoodward
Posts: 20
Joined: 03 Mar 2022, 04:15

Re: updateSync Function Route Address

Post by MattWoodward » 17 Mar 2022, 06:34

For an external integration point I would anticipate being able to see the following details:
  • Endpoint Address / URL - Where a request is sent to in your Aimeos instance
  • Schema - How the data (e.g. Order ID) in the request should be formatted / structured for Aimeos to interpret it
  • Authentication Mechanism - How the external system authenticates their request with Aimeos
I've searched through the documentation for this information, but haven't had any luck. Can you point me to it?

I'm currently using the latest Laravel distribution of Aimeos.

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

Re: updateSync Function Route Address

Post by aimeos » 18 Mar 2022, 07:47

MattWoodward wrote: 17 Mar 2022, 05:35 Or am I reading this wrong, and the "update page" is actually at:
https:<site root>/shop/checkout/update
I your case it's: <domain>/<site>/update, e.g. yourdomain.com/default/update

See here: https://github.com/aimeos/aimeos-larave ... s.php#L144
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

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

Re: updateSync Function Route Address

Post by aimeos » 18 Mar 2022, 07:53

MattWoodward wrote: 17 Mar 2022, 06:34
  • Endpoint Address / URL - Where a request is sent to in your Aimeos instance
By default (if you don't use another prefix in the routes section of your config/shop.php):

https://<domain>/update
MattWoodward wrote: 17 Mar 2022, 06:34
  • Schema - How the data (e.g. Order ID) in the request should be formatted / structured for Aimeos to interpret it
This depends on what your service provider implementation expects. All service providers are called and you must test if the the required parameters are available, otherwise skip any code execution.
MattWoodward wrote: 17 Mar 2022, 06:34
  • Authentication Mechanism - How the external system authenticates their request with Aimeos
That's also up to your service provider implemenation as e.g. payment gateways have very different means of authentication.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
MattWoodward
Posts: 20
Joined: 03 Mar 2022, 04:15

Re: updateSync Function Route Address

Post by MattWoodward » 22 Mar 2022, 04:07

Thanks for the response! I've tried sending a few requests to that route address. I'm receiving the following response:

Code: Select all

No item found for conditions: Array ( [service.code] => )
Does this talk to something I need to include in the service provider / config, or the HTTP request that gets sent to this address?

User avatar
MattWoodward
Posts: 20
Joined: 03 Mar 2022, 04:15

Re: updateSync Function Route Address

Post by MattWoodward » 22 Mar 2022, 05:41

Further to that, I'm looking at the incoming updatePush routine - so an external system passing orderId along with a status etc to Aimeos. So I'm trying to ascertain if the above error is becuase of the way the provider is currently configured or because Aimeos expects certain data to be passed when the HTTP call comes in from the external system.

User avatar
MattWoodward
Posts: 20
Joined: 03 Mar 2022, 04:15

Re: updateSync Function Route Address

Post by MattWoodward » 22 Mar 2022, 05:47

Ok so another step closer - if I pass "code" to the url with the Code of the service provider this seems to be accepted? Is this the only variable required beyond any other data our provider requires?

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

Re: updateSync Function Route Address

Post by aimeos » 22 Mar 2022, 06:42

Exactly :-)
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
MattWoodward
Posts: 20
Joined: 03 Mar 2022, 04:15

Re: updateSync Function Route Address

Post by MattWoodward » 23 Mar 2022, 01:13

Thanks for confirming. I've added a PR for the docs at: https://github.com/aimeos/aimeos-docs/pull/43

Post Reply