agencednd/oro-api-connector-bundle
Dn'D Oro Api Connector for Oro Commerce >= 1.0
This connector between OroCommerce REST API and Alexa Amazon Echo Dot
| DndOroApiConnectorBundle | OroCommerce ,Community Edition |
|---|---|
| v1.0.* | v1.* |
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ cd /my/orocommerce/installation/dir
$ curl -sS https://getcomposer.org/installer | php
Then, install DndOroApiConnectorBundle with composer:
composer require agencednd/oro-api-connector-bundle
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
The bundle is automatically enabled.
The bundle expose a controller as API, so you have to regenerate the API doc
php app/console oro:api:doc:cache:clear -e prod
The Amazon Function needs to get a wsse header to be authenticated on the Oro's API. The WSSE header is generated from a script in your OroCommerce application. To access of this script, you need to copy the files from vendor/ to web/ with this command line.
cp -R vendor/agencednd/alexa-connector-bundle/Resources/public/scripts/ web/scripts
In web/scripts/generate-wsse-header.php, you have to put your API key : oroUrl/admin/user/profile/view generate key
# generate your user and password
'user:passwd'
From the "scripts" folder in console
echo $PWD
Copy the path prompted
Then modify the .htaccess AuthUserFile with the string pasted and .htaccess like /srv/www/orocommerce/web/scripts/.htpasswd
So, the OAuth2 is on the roadmap of the Oro team and will replace de WSSE.
In your intent model put the content of alexa/intents.json
In your AWS Lambda Function put the content of index.js
Line 23
var oroHost = 'example.com';
With your URL.
Line 28 :
auth: 'user:passwd',
Replace user:passwd by your user password generated for .htpasswd
Index.js:
API:
Founded by lovers of innovation and design, Agence Dn'D assists companies for 11 years in the creation and development of customized digital (open source) solutions for web and E-commerce.
How can I help you explore Laravel packages today?