Addition to Stripe Checkout - Booking Id

  • On Twd
  • Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
More
3 months 3 weeks ago #125217 by On Twd
Hi Tuan
Can I request you add the following code to the next update of the Stripe plugin - client requested this mod as it is so much easier to cross reference payments in stripe with users id in the registrant list.
$metaData = $row->id;
$metaData['Email']  = $row->email;
/**Add Booking ID to Stripe easier to identify than transaction id */
$metaData['BookingID']  = $row->id;
$metaData['Source'] = 'Event Booking';
$metaData['Event']  = $data['event_title'];

Success consists of going from failure to failure without loss of enthusiasm.

Please Log in or Create an account to join the conversation.

  • On Twd
  • Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
More
3 months 3 weeks ago - 3 months 3 weeks ago #125219 by On Twd
Replied by On Twd on topic Addition to Stripe Checkout - Booking Id
Sorry i changed it to
$metaData['UserID']  = $row->id;

as that matches your short code descriptor

Success consists of going from failure to failure without loss of enthusiasm.
Last edit: 3 months 3 weeks ago by On Twd.

Please Log in or Create an account to join the conversation.

More
3 months 3 weeks ago #125228 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Addition to Stripe Checkout - Booking Id
Hello

Added two more data to Stripe meta data:
if ($row->user_id > 0)
{
	$metaData['User ID']= $row->user_id;
}

$metaData['Registrant ID']  = $row->id;

If you want to use it, you can access to My Downloads menu item, download latest version of the payment plugin and upgrade it to your site

Regards,

Tuan
The following user(s) said Thank You: On Twd

Please Log in or Create an account to join the conversation.

  • On Twd
  • Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
More
3 months 3 weeks ago #125233 by On Twd
Replied by On Twd on topic Addition to Stripe Checkout - Booking Id
Super! thanks a million Tuan!

Success consists of going from failure to failure without loss of enthusiasm.

Please Log in or Create an account to join the conversation.

  • On Twd
  • Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
More
2 weeks 3 days ago #127916 by On Twd
Replied by On Twd on topic Addition to Stripe Checkout - Booking Id
Hi Tuan,
Can you confirm if this functionality of including $metaData = $row->id; is in the new Stripe Checkout plugin. This is an essential addition.
If not can I request it is included in future releases.

Success consists of going from failure to failure without loss of enthusiasm.

Please Log in or Create an account to join the conversation.

More
2 weeks 2 days ago #127927 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Addition to Stripe Checkout - Booking Id
Hello

Currently, it's not possible to pass meta data to Stripe with Stripe Checkout payment method. It seems it's not supported by Stripe yet, so we have no way to passing the data

I will try to contact them and ask them to see if they have any way for us to pass meta data, if they provide a way, I will add code to support it

Tuan

Please Log in or Create an account to join the conversation.

  • On Twd
  • Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
More
2 weeks 2 days ago #127944 by On Twd
Replied by On Twd on topic Addition to Stripe Checkout - Booking Id
Hi Tuan,
I have posted additional info into the metadata in stripe checkout this way in a different project - it goes via the payment intent can you add the User ID this way please....??



<?php
session_start();

require_once('./config.php');

$amount = $_POST;
$description = $_POST;


$_SESSION = $_POST;

$requestData = [
'customer_email' => $_POST,
'payment_method_types' => ,
'line_items' => [[
'name' => $company,
'images' => [$website.$logobig],
'amount' => $amount*100,
'currency' => $currency,
'quantity' => 1,
]],
'payment_intent_data' => [
'description' => $description,
],
'success_url' => $website.'success.php',
'cancel_url' => $website.'cancel.php',
];

Success consists of going from failure to failure without loss of enthusiasm.

Please Log in or Create an account to join the conversation.

More
2 weeks 2 days ago #127945 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Addition to Stripe Checkout - Booking Id
Thanks. Look like it's possible, I missed payment_intent_data element

I will work on the modification, then update the package and let you know

Tuan
The following user(s) said Thank You: On Twd

Please Log in or Create an account to join the conversation.

  • On Twd
  • Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
More
1 week 5 days ago - 1 week 5 days ago #128031 by On Twd
Replied by On Twd on topic Addition to Stripe Checkout - Booking Id
Hi Tuan,
If you add the following line to:
com_eventbooking/payments/os_stripecheckout.php
After line 92 'customer_email' => $row->email,
'payment_intent_data' => ['description' => $row->id,]

This adds the registrant id to the stripe dashboard

UPDATE
I have further improved the Stripe checkout to include the Event title and Registrant ID in the dashboard description
First declare the variables
$title = $data['event_title'];
		$bookid = $row->id;
		$desc = $bookid .'-'. $title ;
Next using payments_intent you can add
'payment_intent_data' => ['description' => $desc,]

Can future updates of the plugin include my code.

Success consists of going from failure to failure without loss of enthusiasm.
Last edit: 1 week 5 days ago by On Twd.

Please Log in or Create an account to join the conversation.

  • On Twd
  • Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
More
1 week 5 days ago #128033 by On Twd
Replied by On Twd on topic Addition to Stripe Checkout - Booking Id
Also in the new stripe checkout the name of the event is not visible in the export from stripe

Success consists of going from failure to failure without loss of enthusiasm.

Please Log in or Create an account to join the conversation.