By no means a PCI expert, but I'm assuming from my quick perusal of #2433257: Add Stripe Checkout (iFrame) support that allowing users to add (all card info) and update (expiry date only) card information via the user tab cardonfile integration should probably be disabled if the site is using Stripe Checkout as opposed to stripe.js.

Comments

mesch’s picture

Assigned: mesch » Unassigned

Didn't mean to assign to me! (but can help as time allows).

aviindub’s picture

yes, it should be. aside from the PCI issue, stripe checkout provides its own facility for storing cards.

mxwitkowski’s picture

The feature for managing existing cards and adding new cards to an account is important for recurring payments and subscriptions. Is there a way to continue to have this functionality and still be compliant?

mesch’s picture

Here is my first go at this. Originally I was planning to handle the two integration methods (checkout and stripejs) differently in the respective callbacks, but then I realized that hook_commerce_payment_method_info is called in all the needed places. As far as I know there's nothing in contrib that caches payment method info, so getting things done in this hook should be fine.

While doing this I identified a separate bug in commerce_cardonfile whereby cards can be added/edited/deleted even when the payment method settings (configured via rules action) disable cardonfile. I added a fix for this as well, but really this should be fixed in commerce_cardonfile; I'll open an issue and link to it here.

mesch’s picture

@mxwitkowski, my understanding is that the added security of Stripe checkout comes from Stripe building the form rather than the host e-commerce site. I would assume to maintain that level of security we'd have to do the same for the add/edit card forms, and I'm not aware of Stripe providing that ability at the moment.

This could all be for naught though if it turns out that stripejs and Stripe Checkout do have the same level of PCI compliance. AFAIK this question hasn't been resolved as yet.

mesch’s picture

@aviindub re: #2, are you referring to the "Remember Me" functionality?

aviindub’s picture

@aviindub re: #2, are you referring to the "Remember Me" functionality?

yes.

  • aviindub committed 0578b68 on 7.x-1.x authored by mesch
    Issue #2502109 by mesch: Prevent Add/Update Card Functionality From User...
aviindub’s picture

Status: Active » Needs review

patched, but didnt have time to give it a proper review. hopefully someone else can take a closer look.

torgospizza’s picture

Works for me and this approach seems workable enough (and doesn't seem to interfere with the change made in #2447527: You must supply either a source or a customer id, but I would posit that "updating" a card is fine to do even with Checkout integration. I say this because updating a card doesn't allow you to actually enter the card info, you're only able to update the expiration and the zip code, which are not considered "sensitive".

So personally I would disallow creation of cards, but still allow updating, if the integration method is Checkout.

mxwitkowski’s picture

The feature for managing existing cards and adding new cards to an account is important for recurring payments and subscriptions -- specific example is for when a card needs to be changed on a recurring subscription and no new item purchase will take place. Is there a way to continue to have this functionality and still be compliant?

Perhaps can we use the same iFrame methodology here to add new cards and set them as the default payment method? Then we can use the existing form as @torgosPizza suggests to modify the non-sensitive data?

aviindub’s picture

disallow creation of cards, but still allow updating, if the integration method is Checkout

agreed. it should be fine to update cards in the old form as long as it is restricted to the same fields you could update in the old version.

Perhaps can we use the same iFrame methodology here to add new cards and set them as the default payment method?

This is certainly possible, we just need someone to actually write it. in the meantime, we need to disable this feature as it would disqualify your site from using SAQ A. if you want to see that get developed, i recommend putting it in a separate feature request.

torgospizza’s picture

Status: Needs review » Fixed

Since this was committed I'll set to Fixed. Any further fixes/features need to go into a new Issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

wizonesolutions’s picture

torgospizza’s picture