Support

Home Forums Event Espresso Premium Need to restrict card types with Stripe Gateway

Need to restrict card types with Stripe Gateway

Posted: June 25, 2015 at 10:33 am


Warhol Revisited

June 25, 2015 at 10:33 am

We are using the Stripe gateway via the addon, and need to restrict the card types accepted to just Amex.

I noticed in this post that it’s possible, but this seems to be for EE3? Can you advise if we can do the same thing with EE4 by purchasing support tokens? We need to have this live by June 29th at the latest if possible.

https://eventespresso.com/topic/restricting-stripe-payments-to-just-mastercard-and-visa/

Thanks.


Lorenzo Orlando Caum

  • Support Staff

June 25, 2015 at 11:47 am

Hi, the Stripe payment gateway uses Stripe Checkout which Stripe improves based on processing many transactions each day:

https://stripe.com/docs/checkout

It is also optimized for multiple platforms automatically including desktop and mobile devices (e.g. iPhone)

I could not find an option for restricting card types. Could you share some insight on why you are wanting to only accept a certain card?

The fees appear to be the same for all major cards:

https://stripe.com/us/pricing


Lorenzo


Warhol Revisited

June 25, 2015 at 12:11 pm

Lorenzo,

Can you please look at the post I linked to?

We are running a promotion with Amex for pre-sales of an event, so they want to be the exclusive card option for a limited duration.


Lorenzo Orlando Caum

  • Support Staff

June 25, 2015 at 12:16 pm

Hi, this won’t be possible in Event Espresso 4. The coding is different that the payment gateway for Event Espresso 3 and this uses the Stripe Checkout option:

https://stripe.com/docs/checkout


Lorenzo


Warhol Revisited

June 25, 2015 at 12:19 pm

Here’s what Stripe said:

You can certainly block payments from other cards by detecting card type on tokenization and then blocking cards where the card brand isn’t American Express. You will need to build this, however, and you can point your developer here:
https://stripe.com/docs/api#create_charge

Are you able to do it, or do I need to hire a 3rd party developer?


Lorenzo Orlando Caum

  • Support Staff

June 25, 2015 at 12:24 pm

Hi, I think there is a misunderstanding. Stripe offers several ways to integrate payments. We went with the Stripe Checkout option as they are continually improving it based on processing many transactions each day. It is also optimized for use across multiple devices.

The information that you shared is a different integration with Stripe. That would require a new payment gateway.

Have you considered any other payment options like PayPal Pro or Authorizenet? Those do have the ability to turn off certain card types.


Lorenzo


Warhol Revisited

June 25, 2015 at 12:44 pm

Understood, thanks.

Looking into authorize.net now. I’m assuming you mean the SIM option?

Failing that, can we purchase EE3, and set it up with stripe to only accept amex similar to the post I linked to?


Warhol Revisited

June 25, 2015 at 1:42 pm

THe other gateways aren’t an option for us. Can we purchase EE3 and do it that way?


Josh

  • Support Staff

June 25, 2015 at 1:45 pm

Hi there,

Authorize AIM is the built in EE4 option. EE4 also has a SIM option for off-site payments. Along with that, the PayPal Pro payment method in EE4 has a built in option to allow you to specify which credit card types are accepted.

If you decide to look into the EE3 option, we can work with you on getting that customization working. However, it would be best to evaluate EE3 first and make sure its feature set will meet your needs. Also, the original customization was made to exclude AMEx, so there’d be some work involved to refactor that part of the customization.


Warhol Revisited

June 25, 2015 at 1:49 pm

Thanks Josh. Unfortunately we need to go live with it on Sunday morning, and PayPal Pro takes 3 days to set up. Authorize won’t work because it’s an American business needing to charge in Canadian dollars, which they can’t do.

Stripe seems to be our only option at this point.

If we purchase the EE3 license now, is it possible to get the change done before SUnday AM?


Josh

  • Support Staff

June 25, 2015 at 1:51 pm

Do you have a PHP developer on staff?


Warhol Revisited

June 25, 2015 at 1:53 pm

If instruction of what files to be changed, and what to change, yes, we have someone on staff that can do it. Failing that, we can hire one.


Josh

  • Support Staff

June 25, 2015 at 2:16 pm

You can send a sales/billing question via the form on the contact page to request a change to your account to include the Event Espresso 3 plugin. I will send a note their way and ask them to expedite the account change. There may be an additional charge if there’s a difference in the support license package needed.

The change to the EE3 Stripe gateway that Sidney added a year ago basically adds a check against the credit card number for Amex.

You can make a similar change by copying over the Event Espresso 3 Stripe gateway folder from /gateways/stripe to /wp-content/uploads/gateways/stripe.

Then in the stripe/do_transaction.php file you add this after line 20:

if ( !preg_match( '/^3[47][0-9]{13}$/', $cc ) ) {
	echo "<strong>You are trying to use a card other than American Express. Please resubmit the payment form below with an American Express card.</strong>";
	$cc = '';
}

You’ll also need to change the credit card logo on the payment button, because it includes the logos of other credit card brands. So in stripe/stripe_vars.php on line 21 you change it to something like this:

<img alt="Pay using American Express" src="https://yoursite.com/path-to-your-credit-card-button-image">

Hope that helps!


Warhol Revisited

June 25, 2015 at 2:27 pm

Thanks very much Josh, so if I understand this correctly, we can switch our license to version 3 business from our current version 4 everything without having to additionally purchase the EE3 business?


Josh

  • Support Staff

June 25, 2015 at 2:36 pm

I don’t know, that’s a good question for the sales team. 🙂


Warhol Revisited

June 25, 2015 at 3:22 pm

ok, thank you, I’ll send the email now.


Josh

  • Support Staff

June 25, 2015 at 3:49 pm

You’re welcome.


Warhol Revisited

July 1, 2015 at 6:31 pm

Hi Josh and Lorenzo, just wanted to say thank you very much for your help on this. It was a success, a lot of work, but it worked, we were able to restrict the payment, and run the promotion with Amex.

I have to leave the installation with version 3 live for a month to enable ticket downloads etc, but if you need to remove the v3 license from my account, that’s fine.

THanks again for the quick and very helpful support!

After using and customizing both, I found version 3 a bit easier to customize, but overall prefer version 4. Although the recurring event function in v3 is a big time saver. Any chance of getting that in 4 soon?


Dean

July 2, 2015 at 3:59 am

Hi,

I’ll pass your message onto Lorenzo.

Regarding recurring events for EE4, it’s definitely on our to do list, but currently there is no timescale for when it will be introduced.

The support post ‘Need to restrict card types with Stripe Gateway’ 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