osHelpers - Help for your osCommerce store
 
oscommerce Seo
  Seo Pack 2
  SE Friendly URLs
  Session ID Removal
  Title and Meta Tags
  Google Sitemap
Magnum Shopping Cart
  Magnum Light
  Magnum Multi Store
  Magnum MVS Basic
  Magnum MVS Advanced
osCommerce Services
  osc / cre patch
  Data Entry
  Data Extraction
  bugs and fixing
  Site Transfer
  creloaded Transfer
  Design Special
  Hosting
osCommerce Templates
osCommerce Contributions
  Credit Modules
  Features
  Images
  InfoBoxes
  Languages
  Order Total Modules
  Other
  Payment Modules
  Reports
  Shipping Modules
  Templates/Themes
  Zones
osCommerce Articles
  osCommerce Article 167
  osCommerce Article 166
  osCommerce Article 165
  osCommerce Article 164
  osCommerce Article 163
  osCommerce Article 162
  osCommerce Article 161
  osCommerce Article 160
  osCommerce Article 159
  osCommerce Article 158
  osCommerce Article 157
  osCommerce Article 156
  osCommerce Article 155
  osCommerce Article 154
  osCommerce Article 153
  osCommerce Article 152
  osCommerce Article 151
  osCommerce Article 150
  osCommerce Article 149
  osCommerce Article 148
  osCommerce Article 147
  osCommerce Article 146
  osCommerce Article 145
  osCommerce Article 144
  osCommerce Article 143
  osCommerce Article 142
  osCommerce Article 141
  osCommerce Article 140
  osCommerce Article 139
  osCommerce Article 138
  osCommerce Article 137
  osCommerce Article 136
  osCommerce Article 135
  osCommerce Article 134
  osCommerce Article 133
  osCommerce Article 132
  osCommerce Article 131
  osCommerce Article 130
  osCommerce Article 129
  osCommerce Article 128
  osCommerce Article 127
  osCommerce Article 126
  osCommerce Article 125
  osCommerce Article 124
  osCommerce Article 123
  osCommerce Article 122
  osCommerce Article 121
  osCommerce Article 120
  osCommerce Article 119
  osCommerce Article 118
  osCommerce Article 117
  osCommerce Article 116
  osCommerce Article 115
  osCommerce Article 114
  osCommerce Article 113
  osCommerce Article 112
  osCommerce Article 111
  osCommerce Article 110
  osCommerce Article 109
  osCommerce Article 108
  osCommerce Article 107
  osCommerce Article 106
  osCommerce Article 105
  osCommerce Article 104
  osCommerce Article 103
  osCommerce Article 102
  osCommerce Article 101
  osCommerce Article 100
  osCommerce Article 99
  osCommerce Article 98
  osCommerce Article 97
  osCommerce Article 96
  osCommerce Article 95
  osCommerce Article 94
  osCommerce Article 93
  osCommerce Article 92
  osCommerce Article 91
  osCommerce Article 90
  osCommerce Article 89
  osCommerce Article 88
  osCommerce Article 87
  osCommerce Article 86
  osCommerce Article 85
  osCommerce Article 84
  osCommerce Article 83
  osCommerce Article 82
  osCommerce Article 81
  osCommerce Article 80
  osCommerce Article 79
  osCommerce Article 78
  osCommerce Article 77
  osCommerce Article 76
  osCommerce Article 69
  osCommerce Article 68
  osCommerce Article 67
  osCommerce Article 66
  osCommerce article 65
  osCommerce article 64
  osCommerce article 63
  osCommerce article 62
  osCommerce article 61
  osCommerce article 60
  osCommerce article 59
  osCommerce article 58
  osCommerce article 57
  osCommerce article 56
  osCommerce article 55
  osCommerce article 54
  osCommerce article 53
  osCommerce article 52
  osCommerce article 51
  osCommerce article 50
  osCommerce article 49
  osCommerce article 48
  osCommerce article 47
  osCommerce article 46
  osCommerce article 45
  osCommerce article 44
  osCommerce article 43
  osCommerce article 42
  osCommerce article 41
  osCommerce article 40
  osCommerce article 39
  osCommerce article 38
  osCommerce article 36
  osCommerce article 37
  osCommerce article 35
  osCommerce article 34
  osCommerce article 33
  osCommerce article 32
  osCommerce article 31
  osCommerce article 30
  osCommerce article 29
  osCommerce article 28
  osCommerce article 27
  osCommerce article 26
  osCommerce article 25
  osCommerce article 23
  osCommerce article 21
  osCommerce article 20
  osCommerce article 19
  osCommerce article 18
  osCommerce article 17
  osCommerce article 16
  osCommerce article 15
  osCommerce article 14
  osCommerce article 13
  osCommerce article 12
  osCommerce article 11
  osCommerce article 10
  osCommerce article 9
  osCommerce article 8
  osCommerce article 7
  osCommerce article 6
  osCommerce article 5
  osCommerce article 4
  osCommerce article 3
  oscommerce Article 2
  osCommerce Article 1
osCommerce Tutorials
  Installing osCommerce
  Configuring your store
  Adding categories
  Adding products
  Adding product attributes
  Configuring currency
  Adding payment modules
  Adding shipping modules
  Configuring sales tax
  Editing your home page
  Editing columns
  Editing header and footer
  Creating specials
  Managing customers
  Sending out a newsletter
  Sending out email
  Managing your banners
  Backup database
CRELoaded Tutorials
  Add Administrators
  Add Article Author
  Additional Images
  Create a New Page
  Define Mainpage
  Disable cc Encryption
  Disable Company Field
  Disable Country
  Disable Date of Birth
  Display broken images
  Easypopulate Export
  Email confirmation
  Insert Faq
  Max Package Weight
  Require Terms of Use
  Affiliate Newsletter
  Enable Cache
CB Power Affiliate

   OSHELPERS | OSCOMMERCE ARTICLES | OSCOMMERCE ARTICLE 148   



osCommerce Article 148

Installing the Paypal IPN 1.x Contribution in Oscommerce with OpenSSL

Requirements:
 
  • Paypal IPN 1.1 Contribution - http://www.oscommerce.com/community/contributions,2679/download,7019
     
  • Integration Guide - https://www.paypal.com/en_US/pdf/PP_WebsitePaymentsStandard_IntegrationGuide.pdf
     
  • OpenSSL – Comes with Linux , Windows - http://www.slproweb.com/products/Win32OpenSSL.html
  • May also want http://www.oscommerce.com/community/contributions,2679/download,9210 patch

    I. OpenSSL
    1. Download and install OpenSSL if it is not already installed. Remember where it is installed. c:\openssl is a good place.

    2. Click on Start, Run. Type in “cmd” without the quotes to open the dos prompt.

    3. Creating Your Private Key with OpenSSL Using the openssl program and assuming it is installed in c:\openssl, enter the following command to create your private key. The command generates a 1024-bit RSA private key. The private key is stored in the file my- prvkey.pem :

    c:\openssl\bin\openssl genrsa -out my-prvkey.pem 1024

    4. Creating Your Public Certificate Using OpenSSL
    To create your certificate, enter the following openssl command, which generates a public certificate in the file my-pubcert.pem

    c:\openssl\bin\openssl req -new -key my-prvkey.pem -x509 -days 365 -out my-pubcert.pem

    You will be asked several questions:
    Country
    State
    City
    Company Name
    Unit (Division)
    Common Name (Your Name)
    Email Address

    The two files will be saved in the \bin folder where you ran openssl from. Change the path if you did not install to c:\openssl.

    II. Paypal
    1. Login to your Paypal account and click on the Profile tab.

    2. Click on the link on the right for Instant Payment Notification Preferences under Selling Prferences. Click on Edit. Click on the box to enable IPN. Enter the URL on your site to receive notices at. Click on Save. Click on Back to Profile Summary link.

    3. Click on the link on the right for Encrypted Payment Settings under Selling Preferences.

    4. Click on Download to download the Paypal Public Cert. Change the name after download to paypal_cert.pem.

    5. Click on Add to upload your public cert – my-pubcert.pem Browse to it (c:\openssl\bin possibly) and then click Add.

    6. When you get back to the Website Payment Certificates screen, you will see a Cert ID which you willl need to type in later in OsCommerce.

    7. Logout.

    III. Oscommerce
    1. Unzip the Paypal IPN files.

    2. Upload the files under the Oscommerce folder in the right places with FTP.

    3. Upload your public cert, private key, and the Paypal public cert to the /admin folder. That folder should be password protected by Web Protect in Cpanel.

    4. Enable the Paypal IPN (Credit card Debit card) in the Oscommerce Admin panel.

    5. Edit the IPN by clicking on Paypal (Credit card Debit card) then click on Edit.

    6. Most of the fields are self-explanatory. The main ones are:

    a. Email address – set to your seller email address on Paypal.

    b. Gateway server – if you sign up as a developer at http://developer.paypal.com and then create two users in the Sandbox, you can test the IPN in Testing mode with dummy users and transactions before using it. This is for advanced users only. You may go straight to Live Site instead if this is too complicated for you. If you do choose to use the Sandbox, be aware that it uses a different Paypal public cert than the live site. The wrong paypal public cert will generate a 5302 error when testing.

    c. Page Style – this can be selected at Paypal under your Profile.

    d. Debug E-mail Address – an address to send errors to if using testing mode first. Be sure to delete the address here when done or it will keep sending emails.

    e. Enable encrypted payments – set to true.

    f. Your private key – the full home path to your private key ie like /home/username/public_html/store/admin/ my-prvkey.pem (change username to your cpanel username)

    g. Your public cert – the full home path to your public cert ie like /home/username/public_html/store/admin/my-pubcert.pem

    h. Paypal's public certificate – the full home path to Paypal's public cert you uploaded ie like /home/username/public_html/store/admin/paypal_cert.pem

    i. Your Paypal Public Certificate ID – the ID for the public cert you uploaded to Paypal.

    j. Working directory – create a temp folder under your oscommerce folder and enter the full home path here ie like /home/username/public_html/store/temp

    k. OpenSSL Location - /usr/bin/openssl

    l. Click on Update.

    That’s it! Test it Live or through the Paypal Sandbox. Don’t forget to remove the Debug E-Mail Address when done testing.

    Notes:
    This was tested to work on a non-exec enabled server. It will encrypt communications back and forth between Oscommerce and Paypal. If a customer fails to return to your store, the order will still process but their cart will not be emptied. They will need to do it manually. Your cert will expire in 365 days at which time you will need to regenerate it and upload it to paypal. If you change the name, you will need to change it in your ipn settings in the oscommerce admin. You can regenerate it sooner for security.
    osCommerce Article 148
    box_bg_l.gif.
    box_bg_r.gif.
     

    osHelpers

    osHelpers