Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $data = array(
- "UserName" => "sagoropoulos",
- "Email" => "ds@webexpert.gr",
- "PromoCode" => "promo_code_1",
- "CouponCode" => "coupon_code_1",
- "CouponCreatedDt" => "2019-08-07T14:16:32.312493+03:00",
- "CouponDaysActive" => "50",
- "CouponAmount" => "5"
- );
- $data_string = json_encode($data);
- $ch = curl_init('https://platform.cleverpoint.gr/api/v1/Shipping/PromoFromShopCleverPoint/');
- curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
- curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_HTTPHEADER, array(
- 'Content-Type: application/json',
- 'Content-Length: ' . strlen($data_string))
- );
- $result = curl_exec($ch);
- print_r($result);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement