Problem/Motivation

required client information are saved in a Cookie which is non persistent, if user clear his cookie, he cannot use a registered card.

Steps to reproduce

  • Customer register credit card
  • Customer process first checkout
  • Customer clear his cookies
  • Customer buy another product
  • Customer choose a registered card
  • Payment throw exception (PaymentGatewayException)

Proposed resolution

Save / update required client information into user data with \Drupal\user\UserDataInterface class

Remaining tasks

  1. Change Drupal.behaviors.commerceMangopayRegisterCard function
  2. Remove "cookies.set" and use a POST request like preregister-card or a new one
  3. Create new controller or use commerce_mangopay_dpi.preregister_card with extra data
  4. Save info to the user data

If it is ok for you @bdziewierz, i can try to create a patch if you want.

User interface changes

-

API changes

-

Data model changes

Comments

arthur_drupal created an issue.

bdziewierz’s picture

I'd indeed appreciate if you could attempt a patch.

arthur_drupal’s picture

OK, i will prepare it soon.