Adding payment option to cart
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!
Adding payment option to cart
I am trying to add a payment option to the cart using this link:
https://aimeos.org/docs/latest/frontend ... -services/
But I fail.
Can you check the picture and tell what am I doing wrong.
I am supplying only service.id because I feel like the other attributes are not mandatory.
Picture:

https://aimeos.org/docs/latest/frontend ... -services/
But I fail.
Can you check the picture and tell what am I doing wrong.
I am supplying only service.id because I feel like the other attributes are not mandatory.
Picture:
Re: Adding payment option to cart
Posted data:
Post URL:
Response HTTP500 with original Aimeos Server saying in the logs:
Code: Select all
{"data":[{"id":"payment","attributes":{"service.id":"2"}}]}Code: Select all
https://aimeos.priit.yt.lan/jsonapi/basket?id=default&related=service&relatedid=payment&_token=He0bIHUxa4vlT2z2zpjhvFDddeOsjXVfctCo0bfFCode: Select all
Teenuse kehtetud atribuudid
#0 /home/developer/sites/aimeos_main/vendor/aimeos/ai-controller-frontend/src/Controller/Frontend/Basket/Decorator/
Re: Adding payment option to cart
Ok, fiddled with the code inside file:
And came up with errors like these:
Where can I enter these? I can not see any fields in admin panel for them.
Also how can I make aimeos more informative? Do not want to manually edit files to get actual error causes.
Code: Select all
~/vendor/aimeos/ai-controller-frontend/src/Controller/Frontend/Basket/Standard.phpCode: Select all
[2026-01-01 12:53:33] local.DEBUG: body: ["<pre>Array
(
[directdebit.accountowner] => Configuration for "directdebit.accountowner" is missing
[directdebit.accountno] => Configuration for "directdebit.accountno" is missing
[directdebit.bankcode] => Configuration for "directdebit.bankcode" is missing
[directdebit.bankname] => Configuration for "directdebit.bankname" is missing
)
</pre>"]
Also how can I make aimeos more informative? Do not want to manually edit files to get actual error causes.
Re: Adding payment option to cart
I changed payment to "PostPay" and now I managed to set the payment option.
Finally managed to place first order over the API.
But I would like to do it in such a way that I make shipping cost = 0, but actual shipping line item would be added on top of order as separate invoice row line.
Same would apply to payment option.
Is there an easy way to do this?
Finally managed to place first order over the API.
But I would like to do it in such a way that I make shipping cost = 0, but actual shipping line item would be added on top of order as separate invoice row line.
Same would apply to payment option.
Is there an easy way to do this?