RSS Feed/News This is how to prevent Paypal asking for a shipping address via REST API

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
26,836
Points
823

Reputation:

If you only sell User Upgrades, and you do NOT sell physical items, then you can prevent the newest Paypal Rest API from asking for a shipping address.

Just add this code 'shipping_preference' => 'NO_SHIPPING' just after Line 237 in your /src/XF/Payment/PayPalRest.php file on your server.

PHP:

Code:
protected function getSubscriptionParams(string $planId, PurchaseRequest $purchaseRequest, Purchase $purchase): array
{
    return [
        'plan_id' => $planId,
        'quantity'...

Read more

Continue reading...
 
Status
Not open for further replies.
Top