[Skip to main content](#vessel-content)

#   place an order from within a script

##

- **[Maurice](/forum/user/7972-maurice "View Maurice's Profile")**
- [![Maurice's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/7972-maurice "View Maurice's Profile") Topic Author
- [ Offline](/forum/user/7972-maurice)

Less More

- Posts: 151
- Thank you received: 9
-
-

13 years 2 months ago -  13 years 2 months ago [\#122954](#122954) by [Maurice](/forum/user/7972-maurice "View Maurice's Profile")  *[place an order from within a script](/forum/4-how-to/861892-place-an-order-from-within-a-script#122954 "Hi,  We need to connect our shop to another webshop. Our products are displayed in this other shop. When someone buys one (or more) of our products in this external shop, there must be an API call to our shop that:  - creates a customer account if non-existing - confirm the account, send the password to the new account holder - place the order with one or more products - set the orderstatus to a special orderstatus that we have to create yet - make sure the confirmation e-mail with download links is sent to the new customer  We only sell digital downloads.  Any ideas how to do this? API Call? SOAP Integration? HTML post (via cURL)? Other solution?  Oh, of course there must at least some kind of authentication?  Please advice, Maurice")* was created by *[Maurice](/forum/user/7972-maurice "View Maurice's Profile")*

Hi,

We need to connect our shop to another webshop. Our products are displayed in this other shop.
When someone buys one (or more) of our products in this external shop, there must be an API call to our shop that:

- creates a customer account if non-existing
- confirm the account, send the password to the new account holder
- place the order with one or more products
- set the orderstatus to a special orderstatus that we have to create yet
- make sure the confirmation e-mail with download links is sent to the new customer

We only sell digital downloads.

Any ideas how to do this?
API Call? SOAP Integration? HTML post (via cURL)? Other solution?

Oh, of course there must at least some kind of authentication?

Please advice,
Maurice

Last edit: 13 years 2 months ago by [Maurice](/forum/user/7972-maurice "View Maurice's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg2MTg5Mi1wbGFjZS1hbi1vcmRlci1mcm9tLXdpdGhpbi1hLXNjcmlwdD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

13 years 2 months ago [\#122988](#122988) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[place an order from within a script](/forum/4-how-to/861892-place-an-order-from-within-a-script#122988 "Hi,  We need to connect our shop to another webshop. Our products are displayed in this other shop. When someone buys one (or more) of our products in this external shop, there must be an API call to our shop that:  - creates a customer account if non-existing - confirm the account, send the password to the new account holder - place the order with one or more products - set the orderstatus to a special orderstatus that we have to create yet - make sure the confirmation e-mail with download links is sent to the new customer  We only sell digital downloads.  Any ideas how to do this? API Call? SOAP Integration? HTML post (via cURL)? Other solution?  Oh, of course there must at least some kind of authentication?  Please advice, Maurice")*

Hi,

Both shops are HikaShop ?

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg2MTg5Mi1wbGFjZS1hbi1vcmRlci1mcm9tLXdpdGhpbi1hLXNjcmlwdD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Maurice](/forum/user/7972-maurice "View Maurice's Profile")**
- [![Maurice's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/7972-maurice "View Maurice's Profile") Topic Author
- [ Offline](/forum/user/7972-maurice)

Less More

- Posts: 151
- Thank you received: 9
-
-

13 years 2 months ago [\#123173](#123173) by [Maurice](/forum/user/7972-maurice "View Maurice's Profile")  Replied by *[Maurice](/forum/user/7972-maurice "View Maurice's Profile")* on topic *[place an order from within a script](/forum/4-how-to/861892-place-an-order-from-within-a-script#123173 "Hi,  We need to connect our shop to another webshop. Our products are displayed in this other shop. When someone buys one (or more) of our products in this external shop, there must be an API call to our shop that:  - creates a customer account if non-existing - confirm the account, send the password to the new account holder - place the order with one or more products - set the orderstatus to a special orderstatus that we have to create yet - make sure the confirmation e-mail with download links is sent to the new customer  We only sell digital downloads.  Any ideas how to do this? API Call? SOAP Integration? HTML post (via cURL)? Other solution?  Oh, of course there must at least some kind of authentication?  Please advice, Maurice")*

No, only ours is Hikashop. The other is something completely different.
So when they get the payment confirmation, they have to start a script that connects to our site that does these things.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg2MTg5Mi1wbGFjZS1hbi1vcmRlci1mcm9tLXdpdGhpbi1hLXNjcmlwdD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Maurice](/forum/user/7972-maurice "View Maurice's Profile")**
- [![Maurice's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/7972-maurice "View Maurice's Profile") Topic Author
- [ Offline](/forum/user/7972-maurice)

Less More

- Posts: 151
- Thank you received: 9
-
-

13 years 2 months ago [\#123249](#123249) by [Maurice](/forum/user/7972-maurice "View Maurice's Profile")  Replied by *[Maurice](/forum/user/7972-maurice "View Maurice's Profile")* on topic *[place an order from within a script](/forum/4-how-to/861892-place-an-order-from-within-a-script#123249 "Hi,  We need to connect our shop to another webshop. Our products are displayed in this other shop. When someone buys one (or more) of our products in this external shop, there must be an API call to our shop that:  - creates a customer account if non-existing - confirm the account, send the password to the new account holder - place the order with one or more products - set the orderstatus to a special orderstatus that we have to create yet - make sure the confirmation e-mail with download links is sent to the new customer  We only sell digital downloads.  Any ideas how to do this? API Call? SOAP Integration? HTML post (via cURL)? Other solution?  Oh, of course there must at least some kind of authentication?  Please advice, Maurice")*

If there's no easy (standard) solution to this, I was thinking of this:

Create a script on our server where hikashop is running.
Let the external shop do a form post (maybe with cURL or whatever) to our script.

Let our script do some sort of authentication, retrieve the posted values and put them in hikashop.

But what do we need to do in that script to actually place a confirmed order in hikashop?

Maurice

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg2MTg5Mi1wbGFjZS1hbi1vcmRlci1mcm9tLXdpdGhpbi1hLXNjcmlwdD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14325
-
-

13 years 2 months ago [\#123498](#123498) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[place an order from within a script](/forum/4-how-to/861892-place-an-order-from-within-a-script#123498 "Hi,  We need to connect our shop to another webshop. Our products are displayed in this other shop. When someone buys one (or more) of our products in this external shop, there must be an API call to our shop that:  - creates a customer account if non-existing - confirm the account, send the password to the new account holder - place the order with one or more products - set the orderstatus to a special orderstatus that we have to create yet - make sure the confirmation e-mail with download links is sent to the new customer  We only sell digital downloads.  Any ideas how to do this? API Call? SOAP Integration? HTML post (via cURL)? Other solution?  Oh, of course there must at least some kind of authentication?  Please advice, Maurice")*

Hi,

I think that you will have to indeed to a cURL request to the website (ideally a joomla system plugin) with the necessary information in the POST to:
- create the user in Joomla with the save function of the JUser object of Joomla (you have an example of that in the "register" function of the file adminsitrator/components/com_hikashop/classes/user.php which is used upon registration of users via hikaShop to register the user in Joomla). You will also find the code to send the email notification to the user. In fact, if you respect the POST data used by that function you could directly use it.
- create an order in HikaShop. If the order is created as confirmed the download links will be directly in the order creation notification email which is sent automatically by the system when the order is created as long as you do it via the save function of class.order).
You can find an example of creation of an order in the pay_confirm function of the file administrator/components/com_hikashop/classes/user.php where an order is created fro the payment of the affiliate commissions of a partner. A more complete but more complex one is in the after_confirm function of the file components/com_hikashop/controllers/checkout.php where the order is created at the end of the checkout.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg2MTg5Mi1wbGFjZS1hbi1vcmRlci1mcm9tLXdpdGhpbi1hLXNjcmlwdD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.051 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
