To ICEPAY Homepage »
Developer Network

Class references

ICEPAY Class

The ICEPAY class is the base class for all other ICEPAY subclasses.

Remarks: You should only be using this class if you want end-users to be redirected to the ICEPAY payment selection screen where they will be able to choose from a list of payment methods.

Methods

ICEPAY.Constructor ( int merchantID , string secretCode )

You will need an API Key in order to call the constructor.

Argument Description
Merchant ID This is part of your API Key
Secret code This is part of your API Key

ICEPAY.SetOrderID ( string orderID )

Use this method to set the Order ID for a payment. The Order ID can be the ID of your internal database record.
You can later use this information in the Postback script to do transaction synchronization between ICEPAY and your database.

Remarks: the Order ID must be unique and its length may not be longer than 10 characters!

ICEPAY.SetReference ( string reference )

Use this method to set the reference for a payment. The reference is custom information that you want to add to a payment.
You can later use this information in the Postback script for your own purposes.

ICEPAY.SetLogging ( bool logging )

You can enable or disable logging. Enabling logging would provide you with debug logs which later can come in handy when you contact technical support. Logging is by default turned OFF.

ICEPAY.SetLoggingDirectory ( string loggingDirectory )

Set the logging directory path. Please make sure that your website has write access in the specified directory.

ICEPAY.SetStreamMethod ( string streamMethod )

Set the streaming method to acquire the payment URL. By default the streaming method is FOPEN. Checks will be made for method availability if the method is not set.

Argument Description
FOPEN Requires the PHP FOPEN library to be installed and compiled.
cURL Requires the PHP cURL library (client URL) to be installed and compiled.
file_get_contents Requires the PHP file_get_contents library to be installed and compiled.

ICEPAY.Pay ( string country , string language , string currency , int amount , string description )

Calling the Pay method will return you a URL to the ICEPAY payment selection screen. You can use this URL to automatically redirect the end-user to the payment selection screen. On the payment selection screen, the end-user can make a selection from a list of available payment methods. By setting the arguments such as country, language, etc. you will be able to influence the list of available payment methods. For instance, if you provide U.S. dollar (USD) as the currency, then the iDEAL payment method will disappear from the list, as this payment method does not support the U.S. dollar currency.

Argument Description
Country Specifies the country. The following countries are supported:

00
Country does not matter
NL
Netherlands
AT
Austria
AU
Australia
BE
Belgium
CA
Canada
CH
Switzerland
CZ
Czech Republic
DE
Germany
ES
Spain
FR
France
IT
Italy
LU
Luxembourg
PL
Poland
PT
Portugal
SK
Slovakia
GB
United Kingdom
US
United States
Remarks: payment methods that are not supported in the specified country will disappear from the payment selection screen
Language Specifies the language of the payment selection screen. Payment methods that do not support the language will disappear from the list
Currency Specifies the currency of the payment. The following currencies are supported:

GBP
Pound sterling
EUR
Euro
USD
U.S. dolla
Remarks: payment methods that do not support the specified currency will disappear from the payment selection screen
Amount Specifies the amount (in cents) of the payment.
Payment methods that do not support the specified amount will disappear from the payment selection screen
Description Specifies the description of the payment

ICEPAY.OnSuccess ()

Your Success URL should be calling this method to check if it is actually called by ICEPAY.
Returns True if the call is valid, otherwise False.

ICEPAY.OnError ()

Your Error URL should be calling this method to check if it is actually called by ICEPAY.
Returns True if the call is valid, otherwise False.

ICEPAY.GetData ()

Returns information for the Success URL or Error URL.

Field Description
status Can be any of the following values:
statusCode A description of the status.
merchant This is the merchant ID that is part of your API Key.
orderID This is the order ID generated by ICEPAY. You can safely ignore this.
paymentID Please mention this value when you ever contact ICEPAY support regarding a payment.
reference This is the reference of the payment that you may have set using the SetReference method.
transactionID This is the transaction ID generated by the issuer.

ICEPAY.OnPostback ()

Your Postback URL should be calling this method to check if it is actually called by ICEPAY.
Returns True if the call is valid, otherwise False.

ICEPAY.GetPostback ()

This method returns the Postback information posted by ICEPAY. The Postback information
contains valueble information regarding the payment.

In .NET, this information will be returned as a ICEPAY.ICEPAY.Postback Type.
In PHP, this information will be returned as an array.

Field Description
status Contains the status of the payment. You can expect one of the following string values:

OK
Payment completed
OPEN
Payment not yet completed. Expect another postback in the near future.
ERR
Payment was cancelled, failed or expired.
REFUND
Payment was refunded by the merchant.
CBACK
Payment was charged back by the end-user.
statusCode A description of the status.
merchant This is the merchant ID that is part of your API Key.
orderID This is the order ID generated by ICEPAY. You can safely ignore this.
paymentID This is the ICEPAY transaction ID.
Please mention this value when you ever contact ICEPAY support regarding a payment.
reference This is the reference of the payment that you may have set using the SetReference method.
transactionID This is the transaction ID generated by the issuer.
consumerName The name of the end-user.
This information is only available for iDEAL payments and wire transfers.
consumerAccountNumber The account number of the end-user. Only the last four digits is available.
This information is only available for wire transfers.
consumerAddress Address of the end-user.
consumerHouseNumber Address' house number of the end-user.
consumerCity City in which the end-user resides.
consumerCountry Country in which the end-user resides.
consumerEmail E-mail of the end-user.
consumerPhoneNumber Phone number of the end-user.
consumerIPAddress IP address of the end-user.
amount Amount that is paid by the end-user.
currency Amount that is paid by the end-user.
duration The call duration in seconds.
This information is only available for phone payments.
paymentMethod Specifies which payment method was used for this payment, e.g. CREDITCARD, IDEAL, etc.