A credit card payment profile is created in Subscribe Pro
a. This could be directly in Subscribe Pro
b. This could be done via the Magento 2 integration
The Merchant has Account Updater enabled on their Subscribe Pro environment, and all cards enrolled.
(Account Updater is a tool used to retrieve changes to credit card from their issuer.)
The credit card is updated, and there's a new card number and expiration date.
The webhook payment_profile.updated is sent to Magento
Magento processes the webhook and updates the Expiration Date only
When customer checks out on Magento site or manages their payment profiles in Stored Payment Methods they see their old last four.
Expected Result
maskedCC and other updated fields (maskedCC, expirationDate, paymentToken) should be updated in the details section, and customer will see the correct last four of the card in Stored Payment Methods, and Checkout.
In My Account > Stored Payment Methods Add New Card
Connect to your Magento MySql instance, and find the last created entry in the vault_payment_token table.
SELECT * FROM vault_payment_token ORDER BY entity_id DESC LIMIT 1 \G; to get the id, etc.
Find the Payment Profile in Subscribe Pro, and click the Save button. This will generate the payment_profile.updated webhook to be sent.
Refresh the System > Webhook Event Log until you see that the webhook has been delivered.
Return to Magento MySql, and select the last row. The expires_at and expirationDate in the details section should be returned to normal, but maskedCC is left in incorrect state.
Issue
Expected Result
maskedCC and other updated fields (maskedCC, expirationDate, paymentToken) should be updated in the details section, and customer will see the correct last four of the card in Stored Payment Methods, and Checkout.
Steps to Reproduce
Add New Card
SELECT * FROM vault_payment_token ORDER BY entity_id DESC LIMIT 1 \G;
to get the id, etc.Result
I solved this in my dev env by:
Edit /Helper/Vault.php and added lines