Advertisement
designbymerovingi

mycred_stripe_purchase_success example

Feb 2nd, 2017
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.84 KB | None | 0 0
  1. /**
  2.  * Stripe Payment Completed
  3.  * @version 1.0
  4.  */
  5. function mycred_pro_stripe_payment_completed( $message, $pending_payment, $gateway ) {
  6.  
  7.     $point_type     = $pending_payment->point_type; // the point type purchased
  8.     $cost           = $pending_payment->cost; // the cost
  9.     $currency       = $pending_payment->currency; // the currency
  10.     $amount         = $pending_payment->amount; // the point amount requested
  11.     $buyer_id       = $pending_payment->buyer_id; // the numeric id of the buyer
  12.     $recipient_id   = $pending_payment->recipient_id; // the recipient id unless this is a gift, this is the same as $buyer_id
  13.     $transaction_id = $pending_payment->transaction_id; // the transaction id assigned by the gateway processor
  14.    
  15.  
  16.     return $message;
  17.  
  18. }
  19. add_filter( 'mycred_stripe_purchase_success', 'mycred_pro_stripe_payment_completed', 10, 3 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement