daily pastebin goal
39%
SHARE
TWEET

Authorize.net AIM Additional Charge

eventsmanager Dec 5th, 2018 94 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  Additional charge using Authorize.net AIM gateway
  3.  */
  4. function my_em_add_Authorize_surcharge($sale, $EM_Booking, $EM_Gateway_Authorize_AIM){
  5.    
  6.     $count = $EM_Booking->get_tickets_bookings()->tickets_bookings;
  7.     $price = 0;
  8.     foreach( $EM_Booking->get_tickets_bookings()->tickets_bookings as $EM_Ticket_Booking ){
  9.         $price += round($EM_Ticket_Booking->get_price() / $EM_Ticket_Booking->get_spaces(), 2);
  10.     }
  11.     $price = ($price  * .02);
  12.     $sale->addLineItem( 0, 'Charge', 'Booking Charge', 1, $price, 'Y' );
  13.    
  14.     return $sale;
  15. }
  16. add_filter('em_gateawy_authorize_aim_sale_var','my_em_add_Authorize_surcharge',1,3);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top