Quantcast
Channel: Opinion: Shopify Community - Shopify APIs & SDKs
Viewing all articles
Browse latest Browse all 25503

Ryan | Add to Cart Apps commented on Creating webhook for Uninstalling an Shopify App in PHP

$
0
0

I found a good example of HttpSocket and sending JSON.

public function actiontooutbound($idUser, $course, $price){
 $HttpSocket = new HttpSocket();

    $data = array(
           "api_key" => "API KEY","user_id" => $idUser,"event" => "other","extra" => array("course" => $course,"price"=> $price )
               );

    $request = array(
        'header' => array('Content-Type' => 'application/json',
        ),
    );
    $data = json_encode($data);
    $response = $HttpSocket->post('http://api.outbound.io/api/v1/track';, $data, $request);

}

 


Viewing all articles
Browse latest Browse all 25503

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>