...
- Login as an Administrator.
- Navigate to 'Settings' --> 'Punchout Document' (/zPunchOutDocuments.aspx).
- Click the 'cXML Document Setup' tab.
- Click 'New'.
- Populate the fields as follows:
- Document Code: SandBoxTest
- Description: SandBoxTestCV
- Document Type: PayPal
Header Template: use the code snippet below
Code Block
title Code Snippet linenumbers true <html> <body> <form ID="form" name="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="example@commercevision.com.au"> <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="currency_code" value="[order:socurrcode]"> <input type="hidden" name="lc" value="AU"> <input type="hidden" name="custom" value="[receipt:ReceiptNumber]"> <input type="hidden" name="return" value="http://www.YourWebSite.com/OnlinePaymentOK.aspx?receipt=REC[receipt:ReceiptNumber]&type=PAYPAL&order=[ORDER:SOORDERNO]"> <input type="hidden" name="cancel_return" value="http://www.YourWebSite.com/OnlinePaymentFail.aspx?receipt=REC[receipt:ReceiptNumber]&type=PAYPAL&order=[ORDER:SOORDERNO]"> <input type="hidden" name="rm" value="2"> <input type="hidden" name="item_name_1" value="Order Total - Your Business Name"> <input type="hidden" name="item_number_1" value="Order"> <input type="hidden" name="amount_1" value="[ORDER:SOORDERTOTALAMOUNT]"> <input type="hidden" name="notify_url" value="http://www.YourWebSite.com/PayPalNotify.aspx"> <input type="hidden" name="address_override" value="1"> <input type="hidden" name="address1" value="[ORDER:SoDelAddr2]"> <input type="hidden" name="address2" value="[ORDER:SoDelAddr3]"> <input type="hidden" name="city" value="[ORDER:SoDelSuburb]"> <input type="hidden" name="country" value="AU"> <input type="hidden" name="email" value="[ORDER:SoUserIDCode]"> <input type="hidden" name="first_name" value="[ORDER:SoDelAddr1]"> <input type="hidden" name="zip" value="[ORDER:SoDelPostcode]"> <script language="Javascript"> document.forms["form"].submit(); </script> </form> </body> </html>
- Update the following code lines with your information:
- Line 3 - Replace the value "https://www.sandbox.paypal.com/cgi-bin/webscr" with the Sandbox URL provided by PayPal.
- Line 6 - Replace the value "example@commercevision.com.au" with your business identification created by PayPal.
- Line 12 - Replace the value "http://www.YourWebSite.com/OnlinePaymentOK.aspx?receipt=REC[receipt:ReceiptNumber]&type=PAYPAL&order=[ORDER:SOORDERNO]" with the address of your website and the page customers are returned to when a payment has been successful. The complete URL address is required; do not remove the address from 'OnlinePaymentOK' onwards.
- Line13 - Replace the value "http://www.YourWebSite.com/OnlinePaymentFail.aspx?receipt=REC[receipt:ReceiptNumber]&type=PAYPAL&order=[ORDER:SOORDERNO]" with the address of your website and the page customers are returned to when a payment has been unsuccessful. The complete URL address is required; do not remove the address from 'OnlinePaymentFail' onwards.
- Line 15 - Replace the value "Order Total - Your Business Name" with the message displayed to users during payment processing.
- Line 18 - Replace the value "http://www.YourWebSite.com/PayPalNotify.aspx" with the address PayPal use to communicate with your website.
- Click 'OK' to save.
...