Stripe Payment

Add help text somewhere when payment details form shows - Stripe Payment

Add help text somewhere when payment details form shows

by 14Steve14 » Fri Jul 29, 2022 2:23 pm

raiwa

I have customers get confused when paying using the Stripe module. Changing the layout of the input form for the card input details has helped, but I would like to add a small bit of text either above the input form, or in the input form, that explains to the customer that they may need to authorise the payment with a SMS or email.

Is there an easy way to add a short text section some where in the stripe checkout form as I am struggling trying to find the area in the code where I can add a text define or constant. Can you help.

I have added an image to show the sort of thing I am trying to achieve. (text may change)
Attachments
stripe-text.png
14Steve14
VIP Member
VIP Member
Posts: 549
Joined: Fri Oct 25, 2019 7:01 pm
Contact:

Re: Add help text somewhere when payment details form shows

by raiwa » Fri Jul 29, 2022 3:41 pm

Hi Steve,

The table content with the input fields starts in includes/modules/payment/stripe_sca.php line 151:

Code: Select all

            if (mysqli_num_rows($tokens_query) > 0) {
                $content .= '<table id="stripe_table" border="0" width="100%" cellspacing="0" cellpadding="2">';
You could add just before something like:

Code: Select all

             $content .= '<p>' . MODULE_PAYMENT_STRIPE_SCA_HELP_TEXT . '</p>';

            if (mysqli_num_rows($tokens_query) > 0) {
                $content .= '<table id="stripe_table" border="0" width="100%" cellspacing="0" cellpadding="2">';
And of course add the definition for MODULE_PAYMENT_STRIPE_SCA_HELP_TEXT to the language file.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
raiwa
PhoenixCart Developer
PhoenixCart Developer
Posts: 1184
Joined: Sat Dec 21, 2019 8:08 am
Contact:

Re: Add help text somewhere when payment details form shows

by 14Steve14 » Fri Jul 29, 2022 4:56 pm

raiwa wrote:Hi Steve,

The table content with the input fields starts in includes/modules/payment/stripe_sca.php line 151:

Code: Select all

            if (mysqli_num_rows($tokens_query) > 0) {
                $content .= '<table id="stripe_table" border="0" width="100%" cellspacing="0" cellpadding="2">';
You could add just before something like:

Code: Select all

             $content .= '<p>' . MODULE_PAYMENT_STRIPE_SCA_HELP_TEXT . '</p>';

            if (mysqli_num_rows($tokens_query) > 0) {
                $content .= '<table id="stripe_table" border="0" width="100%" cellspacing="0" cellpadding="2">';
And of course add the definition for MODULE_PAYMENT_STRIPE_SCA_HELP_TEXT to the language file.
Works like a charm. Many thanks.
14Steve14
VIP Member
VIP Member
Posts: 549
Joined: Fri Oct 25, 2019 7:01 pm
Contact:

Re: Add help text somewhere when payment details form shows

by mhsuffolk » Sat Jul 30, 2022 10:12 am

Steve
Looking at your example you may consider amending the field labels. The new Mastercards have all the numbers on the back and nothing on the front. So card number on the front and other info on the rear may confuse simple souls even more. "Last 3 numbers on the end of the signature strip" might be better as these new cards have the CVC printed on the card itself at the right hand end of the signature strip.
Live shop Phoenix 1.0.9.0 on PHP 8.0
User avatar
mhsuffolk
VIP Member
VIP Member
Posts: 146
Joined: Sat Oct 26, 2019 9:13 am
Contact:

Re: Add help text somewhere when payment details form shows

by 14Steve14 » Sun Jul 31, 2022 9:30 am

mhsuffolk wrote:Steve
Looking at your example you may consider amending the field labels. The new Mastercards have all the numbers on the back and nothing on the front. So card number on the front and other info on the rear may confuse simple souls even more. "Last 3 numbers on the end of the signature strip" might be better as these new cards have the CVC printed on the card itself at the right hand end of the signature strip.
Many thanks for the suggestion. I have updated the text to better reflect the numbers. Any thing that will reduce customers confusion.
14Steve14
VIP Member
VIP Member
Posts: 549
Joined: Fri Oct 25, 2019 7:01 pm
Contact: