Sample Code Comparison. PayPal Pro - 2012, Pro 2012, PayPal Pro
광고
광고
82
Moving from Website Payments Standard to PayPal Pro
Sample Code Comparison
Below is a comparison of Website Payment Standard code and PayPal Pro code.
N
OTE
: In the samples below, note that for Website Payment Standard, amount
and quantity are specified as 10 and 2 respectively. For PayPal Pro, 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="[email protected]">
<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
PayPal Pro
Code
<form action=”https://securepayments.paypal.com/acquiringweb?cmd=_hostedpayment” method="post"><input type="hidden" name="cmd" value="_hostedpayment">
<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">
Moving from Website Payments Standard to PayPal Pro
<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="billing_first_name" value="John">
<input type="hidden" name=" billing_last_name" value="Doe">
<input type="hidden" name=" billing_address1" value="345 Lark Ave">
<input type="hidden" name=" billing_city" value="San Jose">
<input type="hidden" name=" billing_state" value="CA">
<input type="hidden" name=" billing_zip" value="95121">
<input type="hidden" name=" billing_country" value="US">
<input type="hidden" name="bn" value="CC_Partner_H3S">
<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>
84
Moving from Website Payments Standard to PayPal Pro
다운로드
광고