Send Event Name & Payer Name to Stripe

WordPress Event Management, Calendars & Registration Forums General Question Send Event Name & Payer Name to Stripe

This topic contains 17 replies, has 3 voices, and was last updated by  Wil McDonald 2 months ago.

Viewing 3 posts - 16 through 18 (of 18 total)
  • Author
  • #36646

    Brilliant, thank you Stephen

    There’s just one more detail I can’t find. I want to pass the Booking ID in the statement descriptor as follows:

    add_filter('eventorganiser_stripe_create_payment_intent', function($intent, $booking){
     $bookee = $booking->get_bookee();
     $bookable = $booking->get_bookable();
     $event_id = (int) $bookable->get_event_id();
     $description = 'IC:'.***NEED Booking ID here***;
     // Make sure the string has less than 22 characters - otherwise doesn't seem to appear in Bank statements
     $shortdescription = substr($description,0,21);
     // Add meta details to Stripe
     $intent['metadata']['eventname'] = get_the_title($event_id);
     $intent['metadata']['bookee_fname'] = $bookee->get_first_name();
     $intent['metadata']['bookee_lname'] = $bookee->get_last_name();
     $intent['metadata']['bookee_email'] = $bookee->get_email();
     // Sets statement descriptors for stripe to send to banks
     $intent['statement_descriptor'] = $shortdescription;
     return $intent;
    }, 10, 2 );

    Any help would be fantastic

    Wil McDonald

    Hi Will,


    returns the booking ID.

    Stephen Harris

    Fantastic, thank you. Works well.

    Wil McDonald
Viewing 3 posts - 16 through 18 (of 18 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.