ECommerce
From Kb_JMY(晉明夷)
Contents |
Payment Gateways
Paypal
PayPal Developer Central
- Ref: developer.paypal.com
- PayPal Developer Central account
- This account will allow you to use PayPal sandbox environment to test out
- APIs,
- Website Payments,
- Instant Payment Notification (IPN)
- and other PayPal functionalities.
- Paypal Developer Forums
osCommerce
Switching Languages
- The PayPal checkout page is currently based on the language of the merchant's account. Here is a little hack to add the "lc" (language country) variable to the code of the PayPal module in osCommerce and adapt that page to your osCommerce settings.
- - Open the source code of the PayPal module (catalog\includes\modules\payment\paypal.php)
- - Add/modify the following lines in the process_button function:
| function process_button() {
global $order, $currencies, $currency, $language; if (MODULE_PAYMENT_PAYPAL_CURRENCY == 'Selected Currency') { $my_currency = $currency; } else { $my_currency = substr(MODULE_PAYMENT_PAYPAL_CURRENCY, 5); } if (!in_array($my_currency, array('CAD', 'EUR', 'GBP', 'JPY', 'USD'))) { $my_currency = 'USD'; } switch ($language) { case 'italian': $paypal_lang = 'it'; break; case 'espanol': $paypal_lang = 'es'; break; case 'french': $paypal_lang = 'fr'; break; case 'german': $paypal_lang = 'de'; break; case 'dutch': $paypal_lang = 'nl'; break; default: $paypal_lang = 'us'; } $process_button_string = tep_draw_hidden_field('cmd', '_xclick') . tep_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID) .
tep_draw_hidden_field('item_name', STORE_NAME) .
tep_draw_hidden_field('lc', $paypal_lang) .
tep_draw_hidden_field('amount', number_format(($order->info['total'] - $order->info['shipping_cost']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .
tep_draw_hidden_field('shipping', number_format($order->info['shipping_cost'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .
tep_draw_hidden_field('currency_code', $my_currency) .
tep_draw_hidden_field('return', tep_href_link(FILENAME_CHECKOUT_PROCESS, , 'SSL')) .
tep_draw_hidden_field('cancel_return', tep_href_link(FILENAME_CHECKOUT_PAYMENT, , 'SSL'));
return $process_button_string; } |
Website Payments Standard
- Ref:
Pricing
- Pricing @2006_1129(Wed)
- 2.4% - 3.4% + $2.35 HKD per transaction
- No monthly fees /Setup fees /Gateway fees
- Free eBay and web payment tools
- Antifraud systems at no extra cost
- Monthly Sales Price Per Transaction
- ------------------------------ ---------------------
- $0.00 HKD-$25,000.00 HKD 3.4% + $2.35 HKD
- $25,000.01 HKD-$75,000.00 HKD 2.9% + $2.35 HKD
- $75,000.01 HKD-$750,000.00 HKD 2.7% + $2.35 HKD
- > $750,000.00 HKD 2.4% + $2.35 HKD
Payment Processing
- Customers shop on your website -> Customers pay on PayPal site
- Accept all major credit cards, debit cards, and PayPal through your website or email
- Accept multiple currencies (in ISO-4217 Code)
- Ref: p.56, PP_WebsitePaymentsStandard_IntegrationGuide.pdf
- AUD Australian Dollar
- CAD Canadian Dollar
- CHF Swiss Franc
- CZK Czech Koruna
- DKK Danish Krone
- EUR Euro
- GBP Pound Sterling
- HKD Hong Kong Dollar
- HUF Hungarian Forint
- JPY Japanese Yen
- NOK Norwegian Krone
- NZD New Zealand Dollar
- PLN Polish Zloty
- SEK Swedish Krona
- SGD Singapore Dollar
- USD U.S. Dollar
Customer Checkout Experience
- Send customers from your website to PayPal-hosted checkout
- Customize PayPal-hosted checkout with your website's colors and logos
Implementation Options
- Use hundreds of shopping cart options or your own customized shopping cart
- Use a free shopping cart if you don't already have one
- Use free tools to accept donations or payments for single items from your website
- Receive realtime notification as soon as a payment is made
- Automate payment processing and build new applications using PayPal Web Services APIs
- Test transactions and implementations within PayPal’s testing environment
Website Payments Pro
introduction
- Ref: Paypal.com: Website Payments Pro 2006_1129(Wed) (need to login)
- Pricing @2006_1129(Wed)
- $20.00 USD monthly No monthly fee until 10/31/2005
- No setup fees
- No cancellation fees
- Transaction Fees: 2.4% to 3.4% + $2.35 HKD†
- Benefits:
- With Website Payments Pro, you get an all-in-one payment solution.
- Accept credit card payments directly on your website; PayPal remains invisible - so you control the customer experience.
- And, allow PayPal accountholders to check out fast with saved information, and gain incremental sales from our growing base of more than 100 million user accounts.
Technical Overview
- Ref: Website Payments Pro: Technical Overview (need to login)
Technical Overview
- Ref.Links:
- Website Payments Standard: Technical Overview
- Website Payments Standard
- Payflow Link Gateway
- Payflow Pro Gateway
- Additional Payment Option
- Standard Variable Reference
- IPN/PDT Variable Reference
- API Reference
- API Error Codes
- Ref.Document:
- PP_WebsitePaymentsStandard_IntegrationGuide.pdf
- Subscriptions and Recurring Payments Guide (PDF)
- Order Management Integration Guide (PDF)
- Sandbox User's Guide (PDF)
- Merchant Overview Guide
- Developer Support:
- PayPal Developer Network (PDN)
- Paypal Developer Central
- Payal Developer Forum
- Common Business Scenario
- Scenario 1. I already have a shopping cart on my site.
- Scenario 2. I need a shopping cart for my site.
- Scenario 3. I want to sell one item at a time on my website.
- Scenario 4. I want to sell subscriptions.
- Scenario 5. I want to accept donations.
- or Customize your solution (choose your own features to use)
- Payment Processing Options:
- Customer Checkout Features:
Creating Your First "Buy Now" Button
- Generating the HTML codes
- login Paypal -> go Buy now buttons
- Fill in your item description, item codes, price, currency,
- select buyer's country, button style, button encryption or not.
- Click "Create Button Now" -> That's it!
- Example Coding Generated for:
- <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
- <input type="hidden" name="cmd" value="_xclick">
- <input type="hidden" name="business" value="bills@abc.com">
- <input type="hidden" name="item_name" value="CMS Website Setup Service">
- <input type="hidden" name="item_number" value="web001">
- <input type="hidden" name="amount" value="618.00">
- <input type="hidden" name="no_shipping" value="2">
- <input type="hidden" name="no_note" value="1">
- <input type="hidden" name="currency_code" value="USD">
- <input type="hidden" name="lc" value="HK">
- <input type="hidden" name="bn" value="PP-BuyNowBF">
- <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-butcc.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
- <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
- </form>
- if Button Encryption is selected:
- <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/x-click-butcc.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
- <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-----MIIHXwYJKoZIhvcNAQcEoIIHUDCCB0wCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYC02TiJJRwLAl6ds3V5h86+LppHH23cArJmAfCnGsRGlbfry7scZapPUYR5LWo+PphNJBi8M7v5pgJlvqY7HKgtglXm2S2VwoImC4Z1woAvLm4Gw3m5d/c7av+4+cYHAFYcFSzeVfQUO4n6L1BZoujoAr511drT3Kb4GMooQsqGETELMAkGBSsOAwIaBQAwgdwGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIaLJkOrJJHSmAgbjVRZepk43+05Byhm01jwOs5Yj2DuiEXA4GnJRfWwVO7T4SaWedtITU661aLejS/OFDzkUDkmV9R45vFxmERM+jAapi61YJoX4Mr1d/FsfJ+3lSw2hZxi4a74h389G6/Zvv2+OvZroI6SvAPn7XuIq6ZMfGihjkNqMD1pW6jYeVrsJvsJmaSz5YcAUw12zPGqpnYMrXHRvnRAHiOENuPAWLepx7UhdVVD8Awx09PsCFUpFSk76f+rNjoIIDhzCCA4MwggLsoAMCAQICAQAwDQYJKoZIhvcNAQEFBQAwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVB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AgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMDYxMTMwMDYyNjA0WjAjBgkqhkiG9w0BCQQxFgQUNEP24xhqPqgih1X84sOV8tNMMwAwDQYJKoZIhvcNAQEBBQAEgYAOO0RnUHB28NbgrjWhZRZUEcr6tLy6JTzmLz9W2YnXSGmsmmMrJTuyfgMDPUXhN6y+V0CmnCwLI7ghUMIM/wK/7cYjDwT9Fok30ydozjs3db3+qa8bnytItGCknMRabe77ha+Hjfrro/MAVjQMFiPYNKS40W/iIPaWVwwDejTxPw==-----END PKCS7-----
- ">
- </form>
- Setting Return URL on Individual Transactions
- you can set the value of the return URL on each individual transaction, overriding the value you have stored on PayPal. : the return variable in the HTML FORM is, for example:
- <INPUT TYPE="hidden" NAME="return" value="URLspecificToThisTransaction">
- "Auto Return" must be turned on in your Paypal Profile. Enable "Auto Return" as follows:
- login Paypal -> My Profile -> Selling Preferences -> Website Payment Preferences
- select "Auto Return" = "ON"
- Setting Language Encoding On Individual Transactions
- Some of the charsets:
- utf-8
- Big5 (Traditional Chinese in Taiwan)
- gb2312 (Simplified Chinese)
- HZ-GB-2312 (Traditional Chinese in Hong Kong)
- Example coding:
- <INPUT TYPE="hidden" name="charset" value="utf-8">
- if not set, language encoding equals Website Language Preference which can be set as follows (assumes: Traditional Chinese (UTF-8))
- login Paypal -> My Account -> Profile -> Selling Preferences -> Language Encoding
- -> Select Traditional Chinese -> Save (Save the Language first)
- -> "More Option" button -> Encoding -> select "UTF-8".
- (Ref: p.51, PP_WebsitePaymentsStandard_IntegrationGuide.pdf)
- Enabling Instant Payment Notification (IPN)
- login Paypal -> My Profile -> Selling Preferences -> IPN
Adding Options (Buy Now button /shopping cart button)
- If all the size options are of the same cost you can simply convert the "item_name" hidden variable into a dropdown field instead. For example this is most likely similar to what is in your code now:
- <input type="hidden" name="item_name" value="T-Shirt name M-2XL">
- You could replace it with something like the following
- <select name="item_name">
- <option value="T-Shirt name M-Med">Medium
- <option value="T-Shirt name M-L">Large
- <option value="T-Shirt name M-XL">X-Large
- <option value="T-Shirt name M-2XL">2X-Large
Instant Payment Notification(IPN)
- Ref.Links:
FAQ(Paypal)
PayPal Developer Central
- Ref: developer.paypal.com
- PayPal Developer Central account
- This account will allow you to use PayPal sandbox environment to test out
- APIs,
- Website Payments,
- Instant Payment Notification (IPN)
- and other PayPal functionalities.
- Paypal Developer Forums

