Overview
Our script allows you to have a quick & easy payment terminal for your clients to pay with major credit cards (Visa, Master Card, American Express, Discover) on your website with 2Checkout Payment Terminal API. Installation and configuration of the script takes less than 5 minutes (however you do need to have SSL and 2Checkout Payment account). There are 3 options to pay: 1) customers can *input price themselves* and type description, 2) you can turn on *pre-defined services* and customers will select service from dropdown and 3) customers can select *recurring services from dropdown*
Server Requirements
1) PHP 5.0+
2) cURL and JSON php extensions must be enabled to accept payments (contact your hosting provider if unsure).
Installation
Fresh installation is pretty simple.
1) Unzip the contents of the file which you downloaded from codecanyon.net.
You will find a folder: “2checkout-payment-terminal”. Follow README.html file for documentation.
2) open 2checkout-payment-terminal/includes/config.php and edit all needed variables (see explanation below)
3) Upload “2checkout-payment-terminal” folder to your FTP server.
Configuration File Variables
below you will find all editable variables from includes/config.php and their meaning.
Line 15 through 23 – General settings
Line 16 – Terminal logo file location
Line 26 through 28 – Google ReCaptcha settings
Line 31 – If set to “item” services dropdown will be available on payment page for selection, if set to “input” – fillable amount box will appear
Line 33 – Payment type switch, can be ONETIME or RECUR. If set to ONETIME – payment terminal will charge customers single transaction. If set to RECUR – recurring services dropdown will appear instead of amount input box/services dropdown.
Line 38 through 43 – non-recurring services array. You can add more by copy/pasting line 42 below it.
Line 48 through 53 – Recurring services array. If you need more than 4 recurring options – copy line 52 below it. Array consists of 6 elements: 1 – service name, 2 – service price, 3 – Is product tangible? 4 – billing period (Month, Day, Week, Year), 5 – number of billing periods per billing cycle (for example, 3 here and MONTH in element 4 – will charge customer once every 3 months), 6 – Duration “Day”, “Week”, “Month”, “Year”, “Forever”, 7 – how many periods of previous field, 8 – renewal price, empty means same as regular price
Line 56 – HTTPS redirection, in case your customers landed on a non-https page. Set this to TRUE if going live.
Line 58 – Live/Test indicator. If set to “test” – you will be using TEST environment, setting this to “live” will enable LIVE mode.
Line 62 through 64 – Test environment API credentials (if you want to display British pounds symbol – you need to set currency to “gbp”. Same for EURO sign -> set currency as “eur”)
Line 67 through 69 – Live environment API credentials (if you want to display British pounds symbol – you need to set currency to “gbp”. Same for EURO sign -> set currency as “eur”)
Line 72 – Timezone variable. Default US/Eastern. Change it to your timezone from list here http://php.net/manual/en/timezones.php
Important note: U.S. businesses can accept Visa, MasterCard, American Express, JCB, Discover, and Diners Club. Canadian, European and Australian businesses can accept Visa, MasterCard, and American Express.
Changelog
v1.0 – 27 March 2020
Initial release
Sources, Credits, Appreciation
We’ve used the following images, icons or other files as listed.
- jQuery UI Library – http://www.jqueryui.com
- jQuery Library – http://www.jquery.com
- jQuery Colorbox – http://www.jacklmoore.com/colorbox
- jQuery Tools – http://jquerytools.org/
Once again, thank you so much for purchasing our product.