Integration Guide

Table Of Contents
Moving from Website Payments Standard to Hosted Solution
82
Sample Code Comparison
Below is a comparison of Website Payment Standard code and Hosted Solution code.
N OTE: In the samples below, note that for Website Payment Standard, amount and quantity
are specified as 10 and 2 respectively. For Hosted Solution, the
subtotal is 20, which
is the product of the above-mentioned
amount and quantity. This is highlighted in
bold below.
Sample Website Payments Standard Code
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="seller@designerfotos.com">
<input type="hidden" name="amount" value="10">
<input type="hidden" name="quantity" value="2">
<input type="hidden" name="tax" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name=" invoice" value="MEM32507725">
<!-- Enable override of payer’s stored PayPal address. -->
<input type="hidden" name="address_override" value="1">
<!-- Set prepopulation variables to override stored address. -->
<input type="hidden" name="first_name" value="John">
<input type="hidden" name="last_name" value="Doe">
<input type="hidden" name="address1" value="345 Lark Ave">
<input type="hidden" name="city" value="San Jose">
<input type="hidden" name="state" value="CA">
<input type="hidden" name="zip" value="95121">
<input type="hidden" name="country" value="US">
<input type="hidden" name="bn" value="CC_Partner_WPS">
<input type="hidden" name="notify_url" value="https://www.paypal.com/IPN/">
<input type="image" name="submit" border="0"
src="https://www.paypal.com/img.gif ">
</form>
Sample
Hosted Solution Code
<form action=”https://securepayments.paypal.com/acquiringweb?cmd=_hosted-
payment” method="post"><input type="hidden" name="cmd" value="_hosted-
payment">
<input type="hidden" name="business" value="HNZ3QZMCPBAAA">
<input type="hidden" name="subtotal" value="20">
<input type="hidden" name="paymentaction" value="sale">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="invoice" value="MEM32507725">
<input type="hidden" name="template" value=”TemplateB">
<!-- Enable override of payer’s stored PayPal address. -->
<input type="hidden" name="address_override" value="true">
<input type="hidden" name="showShippingAddress" value="false">
<!-- Set prepopulation variables to override stored address. -->
<input type="hidden" name="first_name" value="John">
<input type="hidden" name="last_name" value="Doe">
<input type="hidden" name="address1" value="345 Lark Ave">