7.3 Configuring your products
We need to re-configure now the 'BUY NOW' buttons (since we are going live).Click on 'Merchant services' and then on 'Buy Now Buttons'.
Fill the 'Buy Now' form with the exact same values that the productHX0001.php has
- Same Product (Item) Name
- Same Item ID Number (it its the filename of the product in this case : productHX0001)
- Same price
- Same Currency
When you are sure that your values are correct just press the 'Add More options' button.
fig:41 Adding Products Step 1
Control your 'Successful Payment Url' and make sure that the 'Cancel Payment Url' is the same.
Select No quantity, No shipping needed and finally press the 'Create button now'. Figure fig:42
fig:42 Adding Products Step 2
Press the 'Select All' button and copy your button code. Figure fig:43
fig:43 Adding Products Step 3
Go to the productHX0001.php file and delete the sandbox BUY NOW code.
Paste the new real button code in the $Product['ButtonLink'] section.
Make sure to remove the single quotation symbol (') from the alt attribute of the PayPal copied code if exist, like done in the chapter 'Going Demo'.
Now your product file should look something like the listing below.
The given button code as you can see is encrypted like the sandbox code.
Note that now you have form action="https://www.paypal.com ...
and not form action="https://www.sandbox.paypal.com that you had before.
<?php //1. MODIFY PRODUCT INFORMATIONS $Product['Name']='First Book'; $Product['Price']='1'; $Product['Currency']='USD'; //Possible values: USD , EUR , AUD , GBP , CAD , HKD , JPY $Product['Filename']='ebook.zip'; //2. MODIFY YOUR 'BUY NOW' BUTTON FOR THIS PRODUCT. Copy it from PayPal.com 'Add a Buy Now button'. $Product['ButtonLink'] = ' <form action="https://www.paypal.com/ cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="image" src=" https://www.paypal.com/en_US/i/btn/btn_ buynow_LG.gif" border="0" name="submit" alt="PayPal - Il sistema di pagamento online piu facile e sicuro!"> <img alt="" border="0" src="https:// www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> <input type="hidden" name="encrypted" value="-----BEGIN PKCS7----- MIIH8QYJKoZIhvcNAQcEoIIH4jCCB94CAQExggEwMI IBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNV BAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbi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ldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEz RBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmV fYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29t AgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJK oZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wODA1MjgxMj U1MzFaMCMGCSqGSIb3DQEJBDEWBBQ3iaYqNKT21mKZ3DF 1oq4vxbuQZjANBgkqhkiG9w0BAQEFAASBgGEnLzact8EI m014CTTrZEXx18sYH71IpiHcmSQ4MXRKe/eg5HH4DMsdI 91JGzLh9MfjK3xTKQAQ92Lr+pcLZ/xBk/AObAnfMEtmZ5 HPqG9lvVFsfJJWJaBqjr5dvzqgKHoFhOpittRn2Erc1/y zXAqkQHPKtSJvQqr2dxcosO1h-----END PKCS7----- "> </form> '; //3. MODIFY RESPONCE MESSAGES $Product['DownloadMessage'] = 'Download this product from here. (Max two attempts)'; $Product['ThanksMessage'] = 'Thanks for your purchase.<br>If you have download problems contact with us at company@email.com'; $Product['ErrorMessage'] = 'Your data does not match with the selected product.<br>Please contact with us at company@email.com'; $Product['ReturnToHomepage'] = '<a href=" http://www.mysite.com"> Return to Mysite.com </a>'; //DO NOT MODIFY $Product['id']=basename(__FILE__ , ".php"); ?>Real product file productHX0001.php
Now you are ready to upload your website. It is clear that it is not necessary to pass every digital product from sandbox to real mode every time.