Open marisks opened 7 years ago
Hi, Order address is saved as customer address (method TrySaveCustomerAddress) Customer address Name is set by order address Id. In case duplicate name, then address name is added with "addressCount" (see table cls_Address and below line of code) https://github.com/episerver/CommercePaymentGateways/blob/master/EPiServer.Business.Commerce.Payment.PayPal/Helpers/AddressHandling.cs#L143
I created 2 orders, checkout with PayPal, and select 2 different addresses but same name on PayPal. The orders still refer to correct address, not losing reference. Is this the case you mentioned? Or you can you please give more details?
/Viet Anh
I have a latest Episerver Commerce installed and this PayPal gateway. When I create an order (through customer UI and not from the Commerce Manager), then after checkout there is no billing address or shipping address in the Commerce Manager.
The reason is that orderAddress.Id is automatically generated by Episerver when using new APIs. But this code: https://github.com/episerver/CommercePaymentGateways/blob/master/EPiServer.Business.Commerce.Payment.PayPal/Helpers/AddressHandling.cs#L59 overwrites it. It should be removed. After this fix everything works fine.
PayPal gateway overwrites order address Id which causes order to become invalid. Payments/shipments lose the reference to their addresses. This line of code does it: https://github.com/episerver/CommercePaymentGateways/blob/master/EPiServer.Business.Commerce.Payment.PayPal/Helpers/AddressHandling.cs#L59