The yotpo api requires authentication through a json request and then needs to be set to send the order details to yotpo when the customers order status is changed to "shipped" order status id = 3
The yotpo documentation can be found here:
[url removed, login to view]
This is for a "general" platform as we are using oscommerce currently.
I have already created the authentication file and it works and returns the user token.
When needs to be done is:
set the oscommerce admin/[url removed, login to view] to "create an order" using the yotpo api (see section [url removed, login to view]) when the order status is changed to shipped.
The order details (email, productid, customer name etc all need to be sent to yotpo through this same api call
I attached the [url removed, login to view] page. line 76 I believe is where the order must be created.
I also have the [url removed, login to view] file I created that looks like this:
$yotpo_keys = array(
$ch = curl_init( "[url removed, login to view]" );
# Setup request to send json via POST.
$payload = json_encode( $yotpo_keys );
curl_setopt( $ch, CURLOPT_POSTFIELDS, $payload );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
# Return response instead of printing.
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
# Send request.
$result = curl_exec($ch);
# Print response.
$yotpo_token_array = json_decode($result, true);
The access token is echo'd at the end of that file but needs to be brought into the request on the orders page.
Hi, I have more than 8 years experience in Oscommerce. I have checked Yotpo API and your [login to view URL] file. i can help you to do this job today. Thanks