Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $client_id = "13589";
- $client_secret = "1ad42c2dfd";
- $access_token = "29d9018a124745d8df4c1062a49b9395517a4e705ef70559e2ea8f638419d6e8";
- $account_id = "1791406";
- /**
- * Initialize the WePay SDK object
- */
- Wepay::useStaging($client_id, $client_secret);
- $wepay = new WePay($access_token);
- /**
- * Make the API request to get the checkout_uri
- *
- */
- try {
- $checkout = $wepay->request('checkout', array(
- 'checkout_id' => $thecheckoutid, // ID of the account that you want the money to go to
- )
- );
- } catch (WePayException $e) { // if the API call returns an error, get the error message for display later
- $error = $e->getMessage();
- }
- mail('aakash_hero2008@yahoo.com','18',$checkout);
- if ($checkout->state == "captured") {
- mail('aakash_hero2008@yahoo.com','5','hello there');
- ///do something here
- } elseif ($checkout->state == "authorized") {
- mail('aakash_hero2008@yahoo.com','6','hello there');
- ///do something here
- } elseif ($checkout->state == "cancelled") {
- mail('aakash_hero2008@yahoo.com','7','hello there');
- ///do something here
- } elseif ($checkout->state == "refunded") {
- mail('aakash_hero2008@yahoo.com','8','hello there');
- ///do something here
- } elseif ($checkout->state == "expired") {
- mail('aakash_hero2008@yahoo.com','9','hello there');
- ///do something here
- }
- ?>**
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement