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

PayPal no_shipping variable #3

Open
remcotolsma opened this issue Jun 21, 2021 · 6 comments
Open

PayPal no_shipping variable #3

remcotolsma opened this issue Jun 21, 2021 · 6 comments
Labels

Comments

@remcotolsma
Copy link
Member

In the Easy Digital Downloads PayPal gateway the PayPal variable no_shipping is set to 1:
https://github.com/easydigitaldownloads/easy-digital-downloads/blob/2.10.5/includes/gateways/paypal-standard.php#L217

developer paypal com_docs_paypal-payments-standard_integration-guide_Appx-websitestandard-htmlvariables_

https://developer.paypal.com/docs/paypal-payments-standard/integration-guide/Appx-websitestandard-htmlvariables/

This makes sense for a download.

Do not prompt buyers for a shipping address.

Valid value is:

  • 0. Prompt for an address, but do not require one.
  • 1. Do not prompt for an address.
  • 2. Prompt for an address and require one.

Default is 0.

Character Length: 1

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

@rvdsteege
Copy link
Member

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.

@remcotolsma
Copy link
Member Author

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.

6887dc8

@remcotolsma
Copy link
Member Author

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.

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.

@rvdsteege
Copy link
Member

If we're not updating the shipping address of the payment/order on payment status update, then 1 is the best option indeed.

@remcotolsma
Copy link
Member Author

remcotolsma commented Jun 21, 2021

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.

admin pay nl_programs_paymentoptionssettings_add

Schermafbeelding 2021-06-21 om 21 48 16

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?

@remcotolsma remcotolsma reopened this Jun 21, 2021
@rvdsteege
Copy link
Member

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.

@remcotolsma remcotolsma transferred this issue from pronamic/wp-pronamic-pay Feb 14, 2023
@remcotolsma remcotolsma moved this to Todo in Pronamic Pay Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

2 participants