Summary
The gateway uses the wrong address in recurring purchase scenarios when there is already a card saved in the user's profile.
The error occurs because the gateway relies on the isBillingAddressDifferent
checkbox, which appears next to the card data at checkout, to define whether it will use the delivery address or billing address in affiliations and antifraud. The problem is that this checkbox in question doesn't even appear in the checkout after the first purchase with the card, but its value is false
by default. This means that, being a delivery or pickup purchase, the address that the gateway will use is the delivery address and not the billing address, and this will bring problems in pickup scenarios or even to generate Bank Slips.
Simulation
Scene A:
- As a new user, go to a store checkout and make a delivery purchase to generate a purchase profile
- When paying for this order, use a card address other than the delivery address
- Make a new purchase with the same email and the same card, but buying from a pickup option
- Observe objects
isBillingAddressDifferent
that will be false and theaddress
of the payment that will be a specific address
Scenario B:
- As a new user, go to a store checkout and make a delivery purchase to generate a purchase profile
- When paying for this order, use the same address as delivery address
- Make a new purchase with the same email and the same card, but buying from a pickup option
- Observe objects
isBillingAddressDifferent
that will be false and theaddress
of the payment tha will not have a specific address
Workaround
N/A