SHARE
TWEET

Untitled

a guest Aug 19th, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $data = array(
  4.     "UserName" => "sagoropoulos",
  5.     "Email" => "ds@webexpert.gr",
  6.     "PromoCode" => "promo_code_1",
  7.     "CouponCode" => "coupon_code_1",
  8.     "CouponCreatedDt" => "2019-08-07T14:16:32.312493+03:00",
  9.     "CouponDaysActive" => "50",
  10.     "CouponAmount" => "5"
  11. );
  12. $data_string = json_encode($data);
  13.  
  14. $ch = curl_init('https://platform.cleverpoint.gr/api/v1/Shipping/PromoFromShopCleverPoint/');
  15. curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
  16. curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
  17. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  18. curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  19.         'Content-Type: application/json',
  20.         'Content-Length: ' . strlen($data_string))
  21. );
  22.  
  23. $result = curl_exec($ch);
  24.  
  25. print_r($result);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top