Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync Addresses and Payment Profiles when customer creates a subscription. #58

Closed
chrismshea opened this issue Jul 11, 2023 · 2 comments · Fixed by #61 or #62
Closed

Sync Addresses and Payment Profiles when customer creates a subscription. #58

chrismshea opened this issue Jul 11, 2023 · 2 comments · Fixed by #61 or #62
Assignees

Comments

@chrismshea
Copy link
Contributor

Current Behavior:

  • Regardless if customer has a subscribe pro customer id or not when they create a new card in My Account a customer will be created/updated with the new card in Subscribe Pro.
  • When they create a new card in checkout and are not creating a subscription the new card will not be saved to Subscribe Pro unless they were also creating a subscription.

Issue:
Only the payment cards/addresses that get created in Subscribe Pro can be used in My Subscription widget to edit their subscription.

What I would like to see:

  • When customer creates an address or card in My Account or Checkout
    • Verify/Sync all customer addresses to Subscribe Pro
    • Verify/Sync all payment profiles to Subscribe Pro
@chrismshea
Copy link
Contributor Author

When adding a new payment profile from Customer Account I receive the below error, and the payment method is not saved.

# ERROR 50 seconds ago (2023-07-25T09:47:22.949Z) RefArch PaymentInstruments-SavePayment
 Error while executing script 'int_subscribe_pro_sfra/cartridge/controllers/PaymentInstruments.js': TypeError: Indexed property '0' can't be read, because class 'class dw.customer.CustomerPaymentInstrument' doesn't support indexed properties (int_subscribe_pro_sfra/cartridge/controllers/PaymentInstruments.js#159)
	at int_subscribe_pro_sfra/cartridge/controllers/PaymentInstruments.js:159 (anonymous)
	at modules/server/EventEmitter.js:151 (emit)
	at modules/server/route.js:115 (done)
	at modules/server/route.js:87 (next)
	at int_subscribe_pro_sfra/cartridge/controllers/PaymentInstruments.js:176 (anonymous)
	at modules/server/route.js:85 (next)
	at app_storefront_base/cartridge/scripts/middleware/csrf.js:36 (validateAjaxRequest)
	at modules/server/route.js:85 (next)
	at app_storefront_base/cartridge/controllers/PaymentInstruments.js:283 (anonymous)
	at modules/server/route.js:85 (next)
	at app_storefront_base/cartridge/scripts/middleware/csrf.js:36 (validateAjaxRequest)
	at modules/server/route.js:85 (next)
	at modules/server/middleware.js:27 (post)
	at modules/server/route.js:93 (anonymous)

@chrismshea
Copy link
Contributor Author

Payment Profiles, and Addresses are not being created in SP when adding a new address/payment method in checkout checking out as a customer with subscriptions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment