Support

Home Forums Event Espresso Premium Payment confusion with Paypal

Payment confusion with Paypal

Posted: May 28, 2014 at 12:42 pm


Jennifer Baca

May 28, 2014 at 12:42 pm

Hi,

We’re using paypal for payments, but when an attendee signs up and wants to use a credit card, all they see is the paypal button to make their payment. I’ve had one person not know what to do because she wanted to use a credit card and not a paypal account. Yes, attendees CAN use a credit card with Paypal, but how can I add a line to the payment method page (where the Paypal button shows up) letting them know they can use a credit card?


Lorenzo Orlando Caum

  • Support Staff

May 28, 2014 at 1:40 pm

Hi,

Are you using Event Espresso 4?

We have a tutorial on how to do that for EE4 here:

https://eventespresso.com/wiki/add-paypal-optional-message-registration-checkout/


Lorenzo


Jennifer Baca

May 28, 2014 at 3:17 pm

We’re using EE 3. I needed all the plugins it has.


Lorenzo Orlando Caum

  • Support Staff

May 28, 2014 at 7:02 pm

Thanks. I looked at the PayPal option during registration checkout for EE3 and I think I can create a similar snippet of code to handle this.

I’m working on it now.


Lorenzo


Lorenzo Orlando Caum

  • Support Staff

May 28, 2014 at 7:27 pm

Hello,

I got this working by targeting the external link notice. See the link below for the sample code to get this setup:

https://gist.github.com/lorenzocaum/7b6b170ceccb275b5c3f

It will look like this:

http://cl.ly/image/1e1z2h1Y0w40


Lorenzo


Jennifer Baca

May 30, 2014 at 12:10 pm

Hi Lorenzo,

I followed the instructions as posted, but when I put the code into functions.php (this code)

<code>function ee_payment_options_paypal_optional( $translated, $original, $domain ) {
$strings = array(
&#039;denotes an external link. clicking will take you to another website for payment processing.&#039; =&gt; &#039;Upon clicking on the PayPal button, you will be transferred to PayPal.com where your payment will be securely processed. A &lt;strong&gt;PayPal account is not required&lt;/strong&gt; and you can pay with a credit or debit card.&#039;
);
if ( isset( $strings[$original] ) ) {
$translations = &amp;get_translations_for_domain( $domain );
$translated = $translations-&gt;translate( $strings[$original] );
}
return $translated;
}
add_filter( &#039;gettext&#039;, &#039;ee_payment_options_paypal_optional&#039;, 10, 3 );</code>

I wasn’t sure where to put it.

I placed it at the bottom of functions.php. Also, I’m not sure if I need opening and closing php tags. I added those. I tried it on my testing version of our site and it seemed to work (I saw the message box). However, some people got a “headers already sent” warning when I put it on the live site.

Where should I place the code? Do I need php tags around it (I think I do) and do you think I merely added an extra space or line break to cause the headers already sent warning?

I removed the code for now until I hear back from you with more info.


Lorenzo Orlando Caum

  • Support Staff

May 30, 2014 at 1:04 pm

Try relocating it towards the middle of the file. A site specific plugin should also work.


Lorenzo


Jennifer Baca

May 30, 2014 at 1:15 pm

I’m not sure what you mean about site-specific plugin. You mean create one? I’ve never done that. Any tips. I’ll try the middle of the file first, although I don’t want to break any code. I’m not the greatest with PHP.


Lorenzo Orlando Caum

  • Support Staff

May 30, 2014 at 1:23 pm

Here is a guide on how to set one up:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/


Lorenzo

The support post ‘Payment confusion with Paypal’ 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.

Event Espresso