Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. $client_id = "13589";
  2. $client_secret = "1ad42c2dfd";
  3. $access_token = "29d9018a124745d8df4c1062a49b9395517a4e705ef70559e2ea8f638419d6e8";
  4. $account_id = "1791406";
  5. /**
  6. * Initialize the WePay SDK object
  7. */
  8. Wepay::useStaging($client_id, $client_secret);
  9. $wepay = new WePay($access_token);
  10.  
  11. /**
  12. * Make the API request to get the checkout_uri
  13. *
  14. */
  15. try {
  16. $checkout = $wepay->request('checkout', array(
  17. 'checkout_id' => $thecheckoutid, // ID of the account that you want the money to go to
  18. )
  19. );
  20. } catch (WePayException $e) { // if the API call returns an error, get the error message for display later
  21. $error = $e->getMessage();
  22. }
  23. mail('aakash_hero2008@yahoo.com','18',$checkout);
  24. if ($checkout->state == "captured") {
  25. mail('aakash_hero2008@yahoo.com','5','hello there');
  26. ///do something here
  27. } elseif ($checkout->state == "authorized") {
  28. mail('aakash_hero2008@yahoo.com','6','hello there');
  29. ///do something here
  30. } elseif ($checkout->state == "cancelled") {
  31. mail('aakash_hero2008@yahoo.com','7','hello there');
  32. ///do something here
  33. } elseif ($checkout->state == "refunded") {
  34. mail('aakash_hero2008@yahoo.com','8','hello there');
  35. ///do something here
  36. } elseif ($checkout->state == "expired") {
  37. mail('aakash_hero2008@yahoo.com','9','hello there');
  38. ///do something here
  39. }
  40. ?>**
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement