What's new
Xen Factory

Register today to become a member! Once signed in, you'll be able to start purchasing our products, ask questions, request support and suggest new ideas!

  • We are aware that a no permission error was shown when you tried to purchase in the last 2 days, this is now fixed.

Suggestion Any way to hide physical address from other users on paypal?

john917

New Member
Is there an option to hide people's address from being revealed when using the payment system? I believe it shows because it thinks of it as a "physical product" so it reveals the address? Maybe I'm wrong on this part.

Here is the issue: I erased it in the image but basically the address shows under "Ship to."
1672522750734.png

Address is also revealed to person receiving the payment through email under "shipping address":
1672522868985.png
 

Clement

Freaky Coder
Staff member
This needs a code change.
That's because I pass a require confirm shipping to Paypal but I think this was required for seller protection to work afterwards in case of claim.
 

john917

New Member
Can we have the option to disable the shipping and pass it as a service? I think some users would prefer to have their address hidden, especially those run by donations.

Would help increase sales without a doubt for a large amount of sites.
 

Clement

Freaky Coder
Staff member
What do you mean as a service ?
An option for sellers to require that parameter set or not ?
 

john917

New Member
What do you mean as a service ?
An option for sellers to require that parameter set or not ?
Yes, I'm not too sure if I have it right but from my understanding, PayPal sellers can sell as a physical product or instead a service type. One shows address while other doesn't.

This is one of couple I've found that mentions this. This particular article mentions how service and even personal payment types won't reveal home address due to it not needing a shipping address.
 

Clement

Freaky Coder
Staff member
Yeah not sure how it maps with our API.
I suspect there is one API parameter for that but not sure it acts on that.

If you want to try, edit all the files in src/addons/XFA/Core/Service/Paypal.
Search for
PHP:
$this->reqConfirmShipping
replace by
PHP:
0
 

john917

New Member
Interesting, there seems to be options implemented already? Unless I'm looking at the wrong file?

SetExpressCheckout.php

1672599461277.png
 

Clement

Freaky Coder
Staff member
Did you replace all instances as I stated ?

What you points out is a different payment service implementation, paypal has multiple.
 

john917

New Member
Ok nvm got it working... just need your help to fix with redirect error.

If you can try changing SetExpressCheckout.php with these variables (I changed 'noshipping' to 1, 'reqconfirmshipping' to 0, and 'addoverride' to 0).

Code:
    public function run()
    {
        /* Prepare the set checkout fields */
        $SECFields = array(
            'token'                 => '',
            'returnurl'             => $this->returnUrl,
            'cancelurl'             => $this->cancelUrl,
            'reqconfirmshipping'    => 0,     // The value 1 indicates that you require that the customer's shipping address is Confirmed with PayPal.  This overrides anything in the account profile.  Possible values are 1 or 0.
            'noshipping'            => 1,  // The value 1 indicates that on the PayPal pages, no shipping address fields should be displayed.  Maybe 1 or 0.
            'allownote'             => '1',                         // The value 1 indicates that the customer may enter a note to the merchant on the PayPal page during checkout.  The note is returned in the GetExpresscheckoutDetails response and the DoExpressCheckoutPayment response.  Must be 1 or 0.
            'addroverride'          => '0',                          // The value 1 indicates that the PayPal pages should display the shipping address set by you in the SetExpressCheckout request, not the shipping address on file with PayPal.  This does not allow the customer to edit the address here.  Must be 1 or 0.
            'email'                 => $this->buyerEmail,
            'solutiontype'          => 'Mark',                      // Normal checkout
            'landingpage'           => 'Billing'                    // Billing page, not log-in page
        );

Everything works and address is now hidden on both seller and buyer.

However on xenforo, instead of redirecting back to resource page, it shoots this error:
Please enter a value for the required field 'name'.
 

john917

New Member
Is there anything you can think of I could try? I got it almost working but this redirect is confusing my users and just looks unprofessional for them
 

Clement

Freaky Coder
Staff member
I checked the code it would need other modifications.

You could try by replacing in src/addons/RMMarketplace/Pub/Controller/Purchase.php and replace:
PHP:
$getExpressCheckoutDetails->getName()

By:
PHP:
'-'
 

john917

New Member
This was working on an old version of the addon, but with the latest version, I had to change $getExpressCheckoutDetails->getName() to '-' in /Pub/Controller/Order.php but I get this error now

xfa_core_error_processing_payment

Can we make this an official feature for the addon? It was working so well and is such a great feature. @Clement
 

Clement

Freaky Coder
Staff member
This was working on an old version of the addon, but with the latest version, I had to change $getExpressCheckoutDetails->getName() to '-' in /Pub/Controller/Order.php but I get this error now
Yeah as I said you need to apply it at every new version.
xfa_core_error_processing_payment
I think the sentence is missing in the core addon.
Can we make this an official feature for the addon? It was working so well and is such a great feature. @Clement
This is added to the feature request so I'll most certainly consider it at some point.
 
Top