Posted: October 30, 2017 at 7:47 am
|
Hi, Good day! I am not sure if this can be done on your end but We need to configure the notifications we get when payments are received, to include the customer name and phone number. Currently they look like this: Congratulations! You have just received a payment of £170.00. You can view the full details of this payment in your dashboard: https://dashboard.stripe.com/payments/ch_1BH7klDP4vNwCR14OqHQ7hZ0 ==== Charge Summary ==== Charge ID: ch_1BH7klDP4vNwCR14OqHQ7hZ0 Charge description: Rebirthing, Bioenergetics & Emotional Release ———————————————————————————————————- with a subject line showing the payment amount and the customer email address. We would like to have, in the Charge Summary if possible, the customer name and phone number if possible. I had a web chat with a support person who told me to include the Customer’s name as part of the Metadata, which can be included in an API call, found here: https://stripe.com/docs/api#metadata I have included the Customer’s name as part of the meta data I just don’t know how to get the phone by customer ID via code, can you look into this? I hope that makes sense; please let me know if not. Thank you! |
Hi there, The email you’re referring to is the Stripe payment confirmation, there is also an email sent from Event Espresso for payment confirmation. By default that only goes to the user but you can set EE to also send one to the event admin. The reason I mention that is it is easier to edit the payment confirmation sent from EE than it is to edit Stripes email (if you can). However, a quick question:
How have you added the customer name as part of the meta data? |
|
|
Hi Tony, Sorry for the late response, I greatly appreciate your help. How could we edit the payment confirmation and set it to be sent also on the event admin (info@osholeela.co.uk)? Does it resolve the issue we are having right now? We added the name on this file Stripe_Onsite Thank you! |
Go to Event Espresso -> Messages -> Default Messages Templates -> Payment Received -> Event Admin. You’ll notice the ‘To’ field is empty, which disables that context from sending. You can either add the email directly to that section and save, or add the [CO_EMAIL] shortcode and EE will use the email address you have set in general settings.
It depends on what details you need to have, the payment receive email can pull registration details for the primary registrant, including the name and phone number. Is that all the info you need?
Please don’t modify core files, if you update the Stripe payment method plugin you’ll lose any modifications you’ve made to that plugin anyway and we have multiple hooks through EE and its add-ons. If there isn’t a hook that allows your changes we can always request one is added. What code did you change? I can check if we need a hook to add the details you need. |
|
|
Hi Tony! Thanks for your suggestion but we really need to receive payment notifications from Stripe only, otherwise we get too many emails. We just needed the contact number and customer’s name on the Stripe notification we are receiving. We edit the code here: and added the Name on this line of code: Stripe::setApiKey( $key ); Can you check on this? Thank you! |
Pretty much the next line after the above is a filter to allow you to add details to
You’re using Heres an example of how you can add the name without hacking up core: That uses the primary registrant’s details from the registrations assigned to the transaction. You mentioned the phone number and using the customer ID to pull that information, do you mean from Stripe? We don’t create customers within Stripe to make payments currently, you can add the phone number if the user provided it during the registration to the metadata in a similar way to the above using:
I’m not sure how you’d use that within the Stripe confirmation email, however. |
|
|
Hi Tony! Thank you for your continuous support. However we are having trouble when we’re configuring your codes. Do you have any other suggestions on how we can include the customer’s name and phone number on the Stripe payment notification? Thank you so much! |
Are you passing the details over and they are not showing on the confirmation email? Or are you having problems pulling the details? (the above pulls full name and the phone number). As we don’t have any control over the Stripe email, I don’t know how you would add those details to that email, have you contacted them since adding the details to meta data asking how to add the details passed into the email? |
|
|
Hello Tony, We have just chatted with stripe support and they are asking if you guys supports Webhooks for Stripe? I think they can do it on their end if there’s a webhooks supported. |
I don’t believe so but I can check with the developers (may take a little due to time differences), however Webhooks are a way for Stripe to post data back to your site, I’m not sure how that helps pull the details into the email. Another option have is to include the Stripe payment link within the admin email you receive when a registration is approved. So from your above message, you could have this:
Within the event admin email, like this – http://take.ms/oTSDN That way you don’t have another email, just include the details in one you already receive. |
|
|
Hello Tony, Thank you for that option! We think that is much better however I am just confused on how to implement that, can you guide me through it or give some step step screenshots? Thank you so much have a great weekend! |
Sure, go to Event Espresso -> Messages -> Default message templates -> Registration Approved -> Event Admin – http://take.ms/0YQVk That’s the template for the message the admin receives when a registration has been approved. Now you want to add the content you want to include and it depends where you want to add it. The way I did the above was to paste in the details you linked above in ‘visual’ mode – http://take.ms/NsxdK Pasted this in place:
Like so – http://take.ms/5ibgN Then switch to Text mode on the editor (next to the visual tab). Now you’ll see the HTML view for the content, find the details you just added in – http://take.ms/qwhC5 Swap out the charge ID from Stripe to use the Now switch back to text mode and you’ll have this – http://take.ms/k1oaj You can convert the Stripe link into an actual link by highlighing it and clicking the link button on the editor – http://take.ms/z84Cv Make sure the popup for the link has Then click the blue arrow to add it. Now save the template and retest. Note that the link will obviously only work for Stripe payments, if you have another payment method it will still build a link in that template, but it won’t take you to an actual payment in Stripe. That help? |
|
|
Hello Tony, Brilliant! This is very helpful! We will try it on the site and we’ll let you know the result. We really appreciate your help. Thanks a lot! |
You’re most welcome. Hopefully that proves a little easier than the above and should include all of the details you need 🙂 |
|
The support post ‘Payment Received Notification’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.