Open remcotolsma opened 3 years ago
Maybe set to 1
if $payment->get_shipping_address()
is null
, 0
otherwise?
I think it's difficult at the moment for us to distinguish between an optional (0
) or required (2
) shipping address.
For now we set the no_shipping
variable to 1
so there is no prompt for an address. For now we require that each extensions requests the shipping details.
https://github.com/wp-pay-gateways/paypal/commit/6887dc8fe6c11d0caad770c7be0d3aebac1f94c9
Maybe set to
1
if$payment->get_shipping_address()
isnull
,0
otherwise?I think it's difficult at the moment for us to distinguish between an optional (
0
) or required (2
) shipping address.
That is also an option, but customers should also make sure that they use the shipping address specified in PayPal for the shipment.
Let's stick to 1
for now.
If we're not updating the shipping address of the payment/order on payment status update, then 1
is the best option indeed.
I just noticed that Pay.nl has a setting for this in the dashboard with the name "Verzendadres Verplicht":
Indien ingeschakeld, checkt PayPal of de adresgegevens van de consument meegestuurd worden met de transactie. Indien niet aanwezig, zullen deze worden opgevraagd op het betaalscherm van PayPal.
We may consider including a similar setting in the gateway configuration.
If we're not updating the shipping address of the payment/order on payment status update, then
1
is the best option indeed.
I don't think it's desirable to auto update the shipping address from PayPal? You (@rvdsteege) mean that for example the WooCommerce order shipping address is overwritten by the PayPal IPN request?
You (@rvdsteege) mean that for example the WooCommerce order shipping address is overwritten by the PayPal IPN request?
Yes, but that sounds confusing indeed :) However, in a later stage we might want to do that with express checkout.
In the Easy Digital Downloads PayPal gateway the PayPal variable
no_shipping
is set to1
: https://github.com/easydigitaldownloads/easy-digital-downloads/blob/2.10.5/includes/gateways/paypal-standard.php#L217https://developer.paypal.com/docs/paypal-payments-standard/integration-guide/Appx-websitestandard-htmlvariables/
This makes sense for a download.
Do we want to set this also to
0
in case of a payment with only virtual (download) items? How can we give this variable the correct value?https://github.com/wp-pay-extensions/easy-digital-downloads/blob/1086b276097a67c33f70fa9fe8efde9ba174004d/src/Gateway.php#L502