Shopify NetSuite Integration via Heroku

Shopify NetSuite Integration via Heroku  Functionality Overview  Initial Heroku Setup and app creation  GitHub implementation and deploying in Heroku  Creating webhooks in Shopify  Creating a script to connect to NetSuite (Restlet) and payload conversion  Restlet in NetSuite to fetch payload and do updates  Initial Heroku Setup  Create a Heroku account and purchase a dyno (Eco),… Continue reading Shopify NetSuite Integration via Heroku

PHP code used in Heroku to call suitelet in the Netsuite when an event happens in Shopify

<?php $_POST = json_decode(file_get_contents(‘php://input’), true); $data = $_POST; if (!empty($data[‘id’])) { $data[‘type’] = $_GET[‘type’]; $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => “https://tstdrv2353842.extforms.netsuite.com/app/site/hosting/scriptlet.nl?script=827&deploy=2&compid=TSTDRV2353842&h=ac7c8e9778d66cb92ffc”, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => “”, CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30000, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => “POST”, CURLOPT_POSTFIELDS => json_encode($data), CURLOPT_HTTPHEADER => array( “accept: */*”, “accept-language: en-US,en;q=0.8”, “content-type: application/json”, “User-Agent: Mozilla/5.0” ),… Continue reading PHP code used in Heroku to call suitelet in the Netsuite when an event happens in Shopify