Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $api_url = "/api/order-status";
- $order_id = "005";
- $response = file_get_contents("$api_url?order_id=$order_id");
- $order_data = json_decode($response, true);
- if ($order_data && isset($order_data['status'])) {
- if ($order_data['status'] === "Paid") {
- $encoded_url = "https://psee.io/7b2jmr";
- $encoded_warning = "UmVtZW1iZXIgdG8gbm90IHVzZSBpdCBmb3Igb3JkZXJzIGFib3ZlICQyMDAwIGF0IG9uY2UgLSB0aGV5IHdpbGwgYmxvY2sgeW91IGFuZCB5b3VyIG5ldHdvcmsu";
- $message = "Thank you for your purchase!" . $encoded_url . "\n" . $encoded_warning;
- sendMessage($order_data['user_email'], $message);
- } else {
- echo "Unpaid";
- }
- } else {
- echo "Invalid response from store API.";
- }
- function sendMessage($recipient, $message) {
- echo "Message sent to $recipient: \n$message";
- }
Advertisement
Comments
-
- https://bigwarp.io/7txvvw88j47z
- https://bigwarp.io/37cal9qxtkfd
- https://bigwarp.io/yojwi7en1pvq
- https://bigwarp.io/qijd9p456n3q
- https://bigwarp.io/8q8rweiy8jbr
- https://bigwarp.io/twu7014koab0
- https://bigwarp.io/a52gx3me2yb6
- https://bigwarp.io/vbg8tr63zpg7
- https://bigwarp.io/0buj2xybbiya
- https://bigwarp.io/bpkjblxxvcne
- https://bigwarp.io/2uybz9tn4ylx
- https://bigwarp.io/zgj5po6pvxzi
- https://bigwarp.io/mku1zg635c3p
- https://bigwarp.io/ehrx7oehy8dz
- https://bigwarp.io/sgrz07aqfp65
- https://bigwarp.io/xrhv7lzwf1lg
- https://bigwarp.io/lng31yy8nn5t
- https://bigwarp.io/1m2pzph656py
- https://bigwarp.io/qigrntkn99pb
- https://bigwarp.io/8zndb2n6jiwy
- https://bigwarp.io/8ekzkk952yu3
- https://bigwarp.io/1u99fslfyel0
- https://bigwarp.io/n6cq48ytrt2i
- https://bigwarp.io/u1id0cxubkyb
- https://bigwarp.io/256mpeyeztk7
- https://bigwarp.io/4tj0wc77cwa6
- https://bigwarp.io/smia0be9sl37
- https://bigwarp.io/4ewhxoikf7h5
- https://bigwarp.io/2in30egwonhl
- https://bigwarp.io/tqy9xpjngixh
- https://bigwarp.io/h9xehnci6u8h
- https://bigwarp.io/qwpzfxbpgu4g
- https://bigwarp.io/l3cf70paqezn
- https://bigwarp.io/d0t4fi81l11u
- https://bigwarp.io/0gzjnnvnrtu3
- https://bigwarp.io/aak8g4hw082r
- https://bigwarp.io/if31zbaew096
- https://bigwarp.io/afpl9j47wc3p
- https://bigwarp.io/fphgzk153qxu
- https://bigwarp.io/c16cno5bjc4e
- https://bigwarp.io/x6xtle3ba6u0
- https://bigwarp.io/aav4uxfa6vy4
- https://bigwarp.io/rxzo4cgcquty
- https://bigwarp.io/tga6z9h6iblh
- https://bigwarp.io/mux73oomlrk4
- https://bigwarp.io/ojso2y0iiqla
- https://bigwarp.io/r2x3ww3buw4q
- https://bigwarp.io/43a823em4m6g
Add Comment
Please, Sign In to add comment
Advertisement