- Posts: 103
- Thank you received: 5
Stripe Metadata
- Russell Noble
- Topic Author
- Offline
- Premium Member
Less
More
8 years 2 months ago #75400
by Russell Noble
Stripe Metadata was created by Russell Noble
Hi,
if you're using the Stripe payment module with the new payment plugins and want metadata to make it easier to match a Stripe payment with a person:
replacement function beforeRequestSend in the os_stripe.php. Just need to add the setMetadata() call.
Perhaps Tuan can add something like this at some point?
if you're using the Stripe payment module with the new payment plugins and want metadata to make it easier to match a Stripe payment with a person:
replacement function beforeRequestSend in the os_stripe.php. Just need to add the setMetadata() call.
Perhaps Tuan can add something like this at some point?
Code:
protected function beforeRequestSend($request, $row, $data)
{
parent::beforeRequestSend($request, $row, $data);
$request->setToken($data['stripeToken']);
$request->setMetadata( array (
'First Name' => $row->first_name,
'Last Name' => $row->last_name,
'Email' => $row->email,
'Source' => 'Event Booking',
'Event' => $data['event_title']
)
);
}
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
8 years 2 months ago #75409
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Stripe Metadata
Thanks Russell for sharing the code, I am going to check and update the payment plugin with this code on Wednesday (will be busy today and tomorrow to complete new version of my other extension Membership Pro)
I'm glad you figure it own. The payment plugin structure has changed a lots to use Omnipay payment processing API and you still know how to change it, surprise
I'm glad you figure it own. The payment plugin structure has changed a lots to use Omnipay payment processing API and you still know how to change it, surprise
Please Log in or Create an account to join the conversation.
- Russell Noble
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 103
- Thank you received: 5
8 years 2 months ago #75682
by Russell Noble
Replied by Russell Noble on topic Stripe Metadata
Tuan,
one other item noted, for organisations which have multiple Stripe accounts, such as mine, the new version of the code doesn't work as it checks if the payment module = 'os_stripe'. For each Stripe instance I'd create a copy of the module and rename, for example os_stripe_test, os_stripe_sydney, os_stripe_melbourne. I've patched it locally by changing the code to strpos instead of direct comparison. Is it possible to get that changed in a future release?
Thanks,
Russell.
one other item noted, for organisations which have multiple Stripe accounts, such as mine, the new version of the code doesn't work as it checks if the payment module = 'os_stripe'. For each Stripe instance I'd create a copy of the module and rename, for example os_stripe_test, os_stripe_sydney, os_stripe_melbourne. I've patched it locally by changing the code to strpos instead of direct comparison. Is it possible to get that changed in a future release?
Thanks,
Russell.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
8 years 2 months ago #75725
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Stripe Metadata
Hi Russell
Yes. Will check it and made the change, maybe have to after our new year holiday (our new year is coming on Monday next week).
During the holiday, I will still work to support customers, but I think I don't have time to work on the improvements
Tuan
Yes. Will check it and made the change, maybe have to after our new year holiday (our new year is coming on Monday next week).
During the holiday, I will still work to support customers, but I think I don't have time to work on the improvements
Tuan
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
8 years 2 months ago #76186
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Stripe Metadata
Hi Russel
Finally, I updated the download package of Events Booking and Stripe payment plugin today with this change. For more details, please see joomdonation.com/forum/events-booking-ge....html?start=10#76185
Finally, I updated the download package of Events Booking and Stripe payment plugin today with this change. For more details, please see joomdonation.com/forum/events-booking-ge....html?start=10#76185
The following user(s) said Thank You: Russell Noble
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2024 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.