|
E-Commerce Scripts > WorldPay Currency Rates |
PHP WorldPay Currency Rates ScriptThe PHP WorldPay Currency Rates script simplifies the use of real-time currency rates on Worldpay-enabled web sites and shopping carts. It provides several routines which can be used by PHP applications, or by client-side JavaScript code on any web site to display currency rates and perform currency conversion calculations. Technical SummaryThe WorldPay Currency Rates script interacts with the WorldPay information service using the methods documented on the WorldPay support knowledgebase, to retrieve the list of currency rates for a particular installation Id. The script encapsulates the code necessary to query the WorldPay information service and interpret the response. It can be included in a PHP script as an include file, and can also be included in any HTML page as a external JavaScript source file. The script provides the following resources for developers:- Download the PHP WorldPay Currency Rates ScriptThe PHP WorldPay Currency Rates script can be downloaded in the following file formats: Download compressed zip file Download as a plain text file:
Script Setup/InstallationDownload one of the files above. If you have downloaded the zip file, extract it to a folder on your computer. Place the PHP script worldpay_currency.php on your web site Important: The web site must have PHP scripting enabled. The script can be placed in any folder, and can be renamed if necessary. If you are not sure if PHP is running on your web site, try uploading and browsing to the well-known debugging script, phpinfo.php, to see if PHP is installed and running. Usage InstructionsOnce the script is installed on your web site, you are ready to use the functions provided by the script in your code or web pages. To use the PHP functions from within your PHP scripts, include the Currency rates script as follows:
This directive should appear only once in any PHP script. Once the Currency rates script has been included in this way, the functions described in the reference section are available for you to use in your code. To use the functions from within JavaScript code, include the Currency rates script as an external JavaScript source file. The reference to the external JavaScript source file must include a identifier in the query string as follows:
The identifying code, "?type=Js", indicates that the script is running in JavaScript mode, and causes the JavaScript functions to be output. PHP Function ReferenceThe following functions are provided to PHP by including the Currency rates script, worldpay_currency.php, in your code as described in the Usage/Instructions section. .
JavaScript Function ReferenceA similar set of functions is provided to JavaScript code by including the Currency rates script, worldpay_currency.php, in a web page. This is described in the Usage/Instructions section.
Technical DetailsThe WorldPay Currency Rates script contains a number of generic functions which offer enhanced features to the repertoire of built-in PHP functions. These can be used in your own PHP code, after including the PHP functions file.
WorldPay Currency Exchange Rates Script DemonstrationA demonstration of the PHP WorldPay Currency Rates script is available and shows the steps that need to be taken to display WorldPay Currency Rates and calculate currency conversions in JavaScript code in an HTML web page.WorldPay Currency Exchange RatesThe exchange rates used by WorldPay are updated every 24 hours at midnight GMT. These rates are then guaranteed for the next 24 hours for all transactions through WorldPay.
|
| As a WorldPay Accredited Partner, we offer integration with the full range of WorldPay products, a complete ecommerce solution, and a discounted WorldPay set-up fee. | ||
|
WorldPay's product and service offerings are unique in the e-commerce arena. |
||
| Top | Home | ECommerce | Hosting | Site Map | Search | © 2003-6 | Contact |