How to Add powered by Stripe on Billing Method

Hi,

Is there a way to add the powered by Stripe on the Billing Method?

Thanks and regards,

Josh

Hi Josh.

Yes, actually you could create a custom template, or do it with CSS. https://s2member.com/kb-article/s2member-pro-forms/#toc-40ec91be

I didn’t know it was desired to have that shown. I’m making a note about it, maybe I’ll add it in a future release.

Thanks for the idea. :slight_smile:

1 Like

Thank you! That is the one place I did not look, I apologize.

I actually opened the stripe billing div php code and added the image there. I also linked the image to Stripe’s website as _blank. I used CSS to manipulate the position and it looks great and functions the way it is supposed to. Are there any downsides besides updates erasing the code I added?

Also, why does the s2Member Security Badge show up in the middle of the footer when on a payment form then shows up on the left everywhere else? I tried using CSS to fix it but it seems to be difficult.

Thanks and regards,

Josh

1 Like

Disregard the s2Member Security Badge CSS issue. I just fixed it.

One question I did have is, when using Stripe, they partnered with TaxJar and others but we chose to go with TaxJar to calculate our sales tax. Putting taxes in manually is a lot of work and TaxJar only works with Stripe Orders API. TaxJar sent me this link https://developers.taxjar.com/blog/handling-sales-tax-with-stripe/ in order to implement taxes on our end of it for the payment processor s2Member uses. As I am doing more research on figuring this out, is it possible to implement this with s2Member?

1 Like

Are there any downsides besides updates erasing the code I added?

If you did it the way the article explains, it’s fine. If you just edited the file in the s2member-pro folder, it’ll get replaced when you update.

TaxJar only works with Stripe Orders API.

See: https://stripe.com/docs/payments/legacy-apis

The one to use going forward is Payment Intents. It’s the one that supports SCA. That’s what I used in the latest release of s2Member. https://stripe.com/docs/payments/payment-intents

I’m sure TaxJar will update their integration to work with Payment Intents. Maybe you can ask them.

:slight_smile:

1 Like

I will definitely go back to do it the correct way.

So all I do is add the payment_intent in the webhook endpoint via the Stripe Dashboard and I will have the SCA? I will let them know about that and hopefully they could get that integrated. I am just not able to picture how they would be able to do that?

Thank you for your help, it is much appreciated.

No, the Payment Intents is the Stripe API that s2Member used to integrate with them in the latest release. This is not something you control on the webhook endpoint.

I mentioned the API, because you said that TaxJar works with the Orders API, and so I needed to explain that s2 doesn’t use that API, it uses the other newer one.

:slight_smile:

Ah, okay that makes sense. So once I update the API via the Stripe Dashboard, I will then have to update the webhook events if I am correct, which is the stuff I have been looking at. Will I also have to update any code or would that be unnecessary? The webhook events is a bit confusing. Not sure what I have to put or leave out exactly, been doing more research. There is a lot to this lol.

I do not know how I am going to use TaxJar or some other tax service when the billing address goes away if there are not taxes set via s2Member. Still more research to be done!

Alos, there seems to be an unnatural gap in between the Billing Method and the Billing Address. Why is this? Here is what I am talking about: http://prntscr.com/q162wq

Those are hidden input fields, but something added line-breaks <br> after each. I’m guessing the editor you used to edit the custom template may have done it, not sure.

the billing address goes away if there are not taxes set via s2Member

So you need to collect billing address info although you’re not using s2’s tax setting. I’m making a note about it to see how I could make it possible before creating the new pro-forms.

once I update the API via the Stripe Dashboard, I will then have to update the webhook events if I am correct, which is the stuff I have been looking at.

You don’t need to update the API via dashboard if you don’t want to, s2 will try to set the API version when it connects, the one on the dash is the default.

I don’t think you need to update the s2Member webhook. What events did you select for the webhook?

:slight_smile:

I contacted my theme and they fixed that issue with CSS. I wish I was better at coding. We are going to take a Udemy course to learn more about coding.

The only reason we would need to do that is to use a tax API from TaxJar or Avalara. That is if I can figure out how to implement their API into our system. Not sure if that would even work, though? I am not sure if it would even be worth it for you to work on or even consider?

I thought it communicated and relayed the API used because I updated our default from 2018 to 11-2019 I just got this message: “You may be using multiple API versions due to your client libraries or plugins.” and I was searching forever to find out what was going on.

The webhook is fine and works on every test, I was just talking about the webhook events. I am just confused on what exactly to use. I use the following events:

  • customer.deleted
  • customer.subscription.updated
  • customer.subscription.trial_will_end
  • customer.subscription.created
  • radar.early_fraud_warning.updated
  • tax_rate.created
  • radar.early_fraud_warning.created
  • customer.tax_id.created
  • payment_intent.amount_capturable_updated
  • payment_intent.canceled
  • payment_intent.created
  • payment_intent.payment_failed
  • payment_intent.succeeded
  • customer.created
  • charge.captured
  • charge.expired
  • charge.failed
  • charge.pending
  • charge.refunded
  • charge.succeeded
  • charge.updated
  • charge.dispute.closed
  • charge.dispute.created
  • charge.dispute.funds_reinstated
  • charge.dispute.funds_withdrawn
  • charge.dispute.updated

One more thing for the Pro Stripe Form. The area they put their card information in, I have it so that they have to verify their zip code. When on mobile or smaller devices, the credit card numbers cut-off the month/year so it looks mashed together. Is that Stripe’s fault for not hiding those numbers after the transition since that is Stripe’s code?

Thanks and regards,

Josh

s2Member Pro pays attention to these events only at the moment:

  • ‘invoice.payment_succeeded’: // Subscription payments.
  • ‘invoice.payment_failed’: // Subscription payment failures.
  • ‘customer.deleted’: // Customer deletions.
  • ‘customer.subscription.deleted’: // Customer subscription deletion.
  • ‘charge.refunded’: // Customer refund (partial or full).
  • ‘charge.dispute.created’: // Customer dispute (chargeback).

Those are the ones needed in your webhook. You can have more, and s2 will ignore them, but if you miss one of these, it’ll affect the expected behavior of s2’s EOT handling.

Is that Stripe’s fault for not hiding those numbers after the transition since that is Stripe’s code?

That’s on Stripe’s side, yeah. I provide a div for the Stripe Card Element and they load the frame where those fields are managed from their side.

1 Like

Awesome, thank you for that information! I reduced it significantly. There were 2 of the patment_intent events I had up go through successfully, the charge.succeeded and charge.failed went through as well all in test mode. I made sure to keep the ones you instructed and then I just added the charge.succeeded and charge.failed.

Is there an article I can bookmark talking about the events you showed me?

1 Like

No, there isn’t. I picked them from the file that handles the webhooks: s2member-pro/src/includes/classes/gateways/stripe/stripe-notify-in.inc.php

:slight_smile:

1 Like

Awesome, thank you. Stripe wants a copy of the code that is used for the Stripe Card Element that has that zip code issue we previously talked about. I am going to search for it but if you could give me the path to it that would be great!

Is part of it where the zip code error would be here: /s2member-pro/src/includes/separates/gateways/stripe/stripe.js ?

1 Like

Yes, that’s the file where the Card Element is added to the pro-form.

Thank you. They gave me a link to a docs page to fix it on smaller devices and recommended using the update() method: https://stripe.com/docs/stripe-js/reference#other-methods. I am going to try and implement it myself, but it is definitely a bit tough. Fun but tough. Hope you are having a good Thanksgiving if you celebrate it.

1 Like