Route [aimeos_page] not defined
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!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Route [aimeos_page] not defined
Hi dear Aimeos team
I'm working with the aimeos headless project. I created a payment provider so I can simply redirect the user to a payment gateway outside my website. The order is created ok. But opening the return url ($this->getConfigValue(array('payment.url-success'))) shows the error Route [aimeos_page] not defined:
Aimeos: 2023.10
PHP: 8.1.2
Env: Linux
I'm working with the aimeos headless project. I created a payment provider so I can simply redirect the user to a payment gateway outside my website. The order is created ok. But opening the return url ($this->getConfigValue(array('payment.url-success'))) shows the error Route [aimeos_page] not defined:
Code: Select all
{
"message": "Route [aimeos_page] not defined.",
"exception": "Spatie\\LaravelIgnition\\Exceptions\\ViewException",
"file": "/var/www/aimeos/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php",
"line": 477,
"trace": [
{
"file": "/var/www/aimeos/vendor/aimeos/aimeos-laravel/src/helpers.php",
"line": 30,
"function": "route",
"class": "Illuminate\\Routing\\UrlGenerator",
"type": "->"
},
{
"file": "/var/www/aimeos/vendor/aimeos/aimeos-laravel/views/base.blade.php",
"line": 89,
"function": "airoute"
},
{
"file": "/var/www/aimeos/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php",
"line": 124,
"function": "require"
},
...
PHP: 8.1.2
Env: Linux
Re: Route [aimeos_page] not defined
Hi.
By default in Aimeos doesn't exist route with the name 'aimeos_page'. You can check more details about your project routes using 'php artisan route:list' in the terminal..
By default in Aimeos doesn't exist route with the name 'aimeos_page'. You can check more details about your project routes using 'php artisan route:list' in the terminal..
Re: Route [aimeos_page] not defined
Can you please hint more on this?
I tried to define the routes as said in https://github.com/aimeos/ai-cms-grapesjs#laravel:
Code: Select all
Route::match(['GET', 'POST'], '{cmspath?}', '\Aimeos\Shop\Controller\PageController@indexAction')
->name('aimeos_page')->where( 'cmspath', '.*' );
Code: Select all
Spatie\LaravelIgnition\Exceptions\ViewException: Route [aimeos_shop_account] not defined.
Thanks for your help
Re: Route [aimeos_page] not defined
Reading Stripe Payment Gateway:
makes me think if the value url-success is ever intended to work with the headless project. If so, how can I call the service provider methods in some laravel controller of mine, and isn't it against the pattern?If you are using the Aimeos headless distribution, you can't use any of the Omnipay drivers as they need the HTML frontend. For pure PWA JS applications, you have to use JS-only solutions like Stripe JS, which you have to add to your PWA yourself.
Re: Route [aimeos_page] not defined
No, the Stripe payment provider implementation requires the HTML frontend and doesn't work in headless environments like described in the docs. You need your own JS only implementation using the Stripe API.
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: Route [aimeos_page] not defined
Right. I'm not trying to use Stripe. What I need in my headless project is to simply redirect the user to an external gateway website after the order is created, then dealing with the result when user is back to the return url, by setting the order status to either PAY_RECEIVED or whatever.
url-success seems to not make sense in headless. Please tell me the correct way to do the following:
1- For sending the user to the external gateway.. should I use a custom return url (and manage stuff in a laravel controller), or url-success would work.
2- When the user is sent back to the return url, I don't want the aimeos-html stuff for that, just a simple thank you page that I can write somewhere in my extension or project. So how can I have my own html page, and also invoke necessary methods of the payment provider (like updateSync) so the order status is updated.
Re: Route [aimeos_page] not defined
Like said, you have to use the StripeJS API in your PWA yourself. Parts of the Aimeos Stripe service payment provider may helpful but you have to adapt it and remove most of the code that is referencing the HTML frontend and it's URLs.
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