0

I'm trying to set up PayPal address_override at my shop checkout as my customers have already filled in their delivery details.

I'm using express checkout, and following on from reading the documentation here: https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/formbasics/

I've got the following basic set up added into my working express checkout code (perl file):

# -- build the request for Paypal
my $response = $useragent->post($api_endpoint, 
    [
        'METHOD' => 'SetExpressCheckout',
        'VERSION' => '3.0',
        'PWD' => $API_PASSWORD,
        'USER' => $API_USERNAME,
        'SIGNATURE' => $API_SIGNATURE,

        'Amt' => $amount, 
        'PAYMENTACTION' => 'Sale', 
        'ReturnUrl' => $returnurl, 
        'CANCELURL' => $cancelurl, 
        'CURRENCYCODE' => $API_CURRENCYCODE,

        'address_override' => '1',
        'address1'  => $d_address1,
        'address2'  => $d_address2,
        'city'  => $d_city,
        'country'  => $country,
        'zip'  => $d_post_code

    ]
);

However this isn't overriding the address when I get through to my PayPal account, it's still just showing my stored addresses.

I've read this post: Paypal | Website Payment Standard | Adddress Override

And this one: Paypal Address Override not working

Hopefully someone can show me where I'm going wrong, or if I've missed a step! Any help appreciated.

Community
  • 1
  • 1
hlh3406
  • 1,382
  • 5
  • 29
  • 46

1 Answers1

1

I may be wrong here but that API link you've pasted doesn't look like it's the same API that the rest of your code sample is using?

Searching for SetExpressCheckout leads to this page: https://developer.paypal.com/docs/classic/api/merchant/SetExpressCheckout_API_Operation_NVP/

I think you need to use the ADDROVERRIDE parameter instead of address_override and whatever else you need from that page.

Adam Taylor
  • 7,534
  • 8
  • 44
  • 54