Integrate SDK and send invoice after order is created
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!
Integrate SDK and send invoice after order is created
Hi, I'm new with Aimeos, I use it with Laravel and what I'm trying to achieve is to integrate QuickBooks SDK, so when the order is created after the user finish the checkout process I can use this sdk and order info and send info to quickbook via their API. So if I understood correctly I need to create my new own extension, right? I used the Aimeos extension builder, unzipped it to /ext folder. Please tell me what should be my next steps, I'm really confused since the docs is really unclear on this topic?
Re: Integrate SDK and send invoice after order is created
Create a delivery service provider for pushing orders to QuickBooks:
https://aimeos.org/docs/latest/providers/service/
You need to configure it afterwards so it will be used during the checkout as delivery option (instead of "Manual"):
https://aimeos.org/docs/latest/manual/service-details/
The delivery service provider will be executed by the order/service/delivery job controller, you have to set up a cronjob for (e.g. for Laravel):
https://aimeos.org/docs/latest/laravel/setup/#cronjobs
https://aimeos.org/docs/latest/providers/service/
You need to configure it afterwards so it will be used during the checkout as delivery option (instead of "Manual"):
https://aimeos.org/docs/latest/manual/service-details/
The delivery service provider will be executed by the order/service/delivery job controller, you have to set up a cronjob for (e.g. for Laravel):
https://aimeos.org/docs/latest/laravel/setup/#cronjobs
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: Integrate SDK and send invoice after order is created
I need to use QuickBook SDK to make an api call just to create an invoice on my quickbook account using order information. I still want user to choose between delivery options, so I'm not sure if your suggested option is approachable.
Re: Integrate SDK and send invoice after order is created
A delivery service provider is not the same as a delivery option. You can create multiple delivery options using the same delivery service provider. The provider is only responsible for connecting to the ERP or accounting service after the order has been completed.
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: Integrate SDK and send invoice after order is created
Ok, I created service provider class in my aimeos extension, it looks like this:
When the checkout process will be completed it will automatically call "process" function in my delivery service class? And there I can use $order variable and push the order to quickbook?
Code: Select all
class QuickBookLink
extends \Aimeos\MShop\Service\Provider\Delivery\Base
implements \Aimeos\MShop\Service\Provider\Delivery\Iface
{
/**
*
* @param \Aimeos\MShop\Order\Item\Iface $order Order instance
* @return \Aimeos\MShop\Order\Item\Iface Updated order item
*/
public function process( \Aimeos\MShop\Order\Item\Iface $order ) : \Aimeos\MShop\Order\Item\Iface
{
}
}
Last edited by fadeeva05 on 23 Mar 2021, 18:33, edited 1 time in total.
Re: Integrate SDK and send invoice after order is created
Also, when I configured it as you said:
this delivery provider is shown as delivery option for customers during the checkout process. Maybe I configured it wrong?You need to configure it afterwards so it will be used during the checkout as delivery option (instead of "Manual"):
https://aimeos.org/docs/latest/manual/service-details/
Re: Integrate SDK and send invoice after order is created
Yes, if you execute the "order/service/delivery" job controller via a cronjob regularly.
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: Integrate SDK and send invoice after order is created
Please share a screenshot of your configuration.
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: Integrate SDK and send invoice after order is created
Here it is, I'll specify service-specific configuration later (api key, etc.)