Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $url = 'https://integration-kilat-api.gojekapi.com/gokilat/v10/booking';
- $ch = curl_init($url);
- $header = array('Client-ID:omiyago-engine', 'Pass-Key:58796d5ed14dfa1a5267547194c03e88156841ef18549768d09ff29d4110374f', 'Accept:application/json', 'Content-Type:application/json');
- $form = '{
- "paymentType": 0,
- "collection_location": "pickup",
- "shipment_method": "Instant",
- "routes": [
- {
- "originName": "",
- "originNote": "",
- "originContactName": "Testing Price",
- "originContactPhone": "085155439743",
- "originLatLong": "-6.257182,106.815275",
- "originAddress": "Jalan Kemang Selatan",
- "destinationName": "",
- "destinationNote": "",
- "destinationContactName": "Testing Juga",
- "destinationContactPhone": "081284967258",
- "destinationLatLong": "-6.257314,106.819658",
- "destinationAddress": "Blok M (Testing)",
- "item": "Led Tv 40 inc",
- "storeOrderId": "",
- "insuranceDetails": {
- "applied": "true",
- "fee": "2500",
- "product_description": "LED TV",
- "product_price": "3500000"
- }
- }
- ]
- }';
- curl_setopt($ch, CURLOPT_POSTFIELDS, $form);
- curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- $result = curl_exec($ch);
- curl_close($ch);
- var_dump($result);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement