PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, July 4, 2022

[FIXED] How to add shipping address in paypal express checkout

 July 04, 2022     paypal     No comments   

Issue

I am using following code for Paypal express checkout,

<form id="paypal-form" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
                <input type="hidden" name="cmd" value="_cart">
                <input type="hidden" name="upload" value="1">
                <input type="hidden" name="business" value="name@email.com">
                    
                <input type="hidden" name="currency_code" value="USD">
                <div><input type="hidden" name="quantity_1" value="1"></div>
                <div><input type="hidden" name="item_name_1" value="Tomato"></div>
                <div><input type="hidden" name="item_number_1" value="SKU Tomato"></div>
                <div><input type="hidden" name="amount_1" value="700.70"></div>
                <div><input type="hidden" name="shipping_1" value="0.00"></div>
                <span class="waves-input-wrapper waves-effect waves-light"><input type="submit" id="paypal-btn" class="btn btn-primary btn-sm px-3 rounded-pill" value="Pay with PayPal"></span>
</form>
  1. I need to add shipping address to this. Is it possible?
  2. Also what is the live production url for https://www.sandbox.paypal.com/cgi-bin/webscr.
  3. Is there any way to add another email address to get extra notification email?

Edit: Solution from Preston PHX - This link provide available variables. I can use address_override. Live url is https://www.paypal.com/cgi-bin/webscr. Also It seems to be not possible to add additional emails to get notification.


Solution

That's not an express checkout, that is the old HTML payments standard.

You should use the current PayPal Checkout. The best flow obtains the address from PayPal after the user signs in, so they don't have to enter it manually if it's saved in their account. This allows for faster checkouts. You can adjust the total based on the address before capturing. It's also possible to offer different shipping options based on the address chosen.



Answered By - Preston PHX
Answer Checked By - Mary Flores (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing