I am trying to create a PayPal subscription form with billing address but it doesn't work, I'm unable to figure out the problem, please have a look at this form.
<form name="_xclick" action="https://www.sandbox.paypal.com/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick-subscriptions" />
<input type="hidden" name="business" value="business.account@test.com" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="no_shipping" value="1" />
<input type="hidden" name="item_name" value="Baseball Hat Monthly" />
<input type="hidden" name="item_number" value="123" />
<input type="hidden" name="a3" value="5.00" />
<input type="hidden" name="p3" value="3" />
<input type="hidden" name="t3" value="M" />
<input type="hidden" name="src" value="1" />
<input type="hidden" name="sra" value="1" />
<input type="hidden" name="return" value="http://www.example.com/thankyou" />
<input type="hidden" name="cancel_return" value="http://www.example.com/cancel" />
<input type="hidden" name="notify_url" value="http://www.example.com/ipn" />
<input type="hidden" value="Colorado Springs" name="city" id="city">
<input type="hidden" value="US" name="country" id="country">
<input type="hidden" value="personal.account@test.com" name="email" id="email">
<input type="hidden" value="Tahir" name="first_name" id="first_name">
<input type="hidden" value="Yasin" name="last_name" id="last_name">
<input type="hidden" value="80903" name="zip" id="zip">
<input type="hidden" value="CO" name="state" id="state">
<input type="hidden" value="219 W. Colorado Avenue Suite 200" name="address1" id="address1">
<input type="hidden" value="" name="address2" id="address2">
<input type="hidden" value="1" name="address_override" id="address_override">
<input type="submit" name="submit" value="Subscribe" />
</form>
You can see address_override
attribute is set to 1
but when I see the order detail in my PayPal business account, it doesn't show me the submitted address but shows following notice.
When you have "no_shipping=1" set you aren't requiring a shipping address for the transaction so that is why the address doesn't appear during the checkout process and in the transaction details.
I changed it to both "2" and "0" but the address didn't appear after I logged into a test account - like it should. If I switch the button type to be "_xclick" with "no_shipping=2" the address does appear correctly.
I'll file a ticket with the engineers to get this resolved for Subscription buttons.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.