I need to pass Order ID, Product ID & User ID of Woocommerce in the Affiliate Offer/Product URL of Hasoffers so that on return call to Hasoffers via API from Woocommerce, I can get update the Status of the Order in Woocommerce.
As per the Hasoffers documentation I believe Stat.affiliate_info1, Stat.affiliate_info2, Stat.affiliate_info3, Stat.affiliate_info4, Stat.affiliate_info5 can be utilised for same.
Affiliate URL: href='<?php echo esc_url( $product_url )."&Stat.affiliate_info2=".$order_id."&Stat.affiliate_info3=".$product_id."&Stat.affiliate_inf4=".$user_id'
(Also I believe I'm calling the Stat.affiliate incorrectly in the URL)
Please guide in correct direction if I'm going wrong as Hasoffers is a new domain for me.
The Solution to post back server posting in Sending Order ID in aff_sub in the url especially for vcommissions which is using Hasoffers. However in my research I've found that aff_sub2 onwards should be used for personal utilisation.
Hence post processing my url each time dynamically becomes
http://iskandariya.solutions/?test=123&aff_sub=162&aff_sub3=20&aff_sub4=1&aff_sub5=website&source=website
where aff_sub is ORDER_ID (which should be aff_sub2 in ideal case) but flipkart and Amazon make it difficult to utilise aff_sub2,3,4,5 fields and hence only aff_sub is utilised in post back tracking.
Once this is done embedded the PHP JSON Code of API which you can compile and call it in your Function decode to the respective Field and pass it to the variable and process it into the Order accordingly.