Search:     Advanced search

Technical documentation for implementing integrated payment form

Article ID: 42
Last updated: 26 Jan, 2012
Views: 5323

Here your can read about how to set-up your own payment html form in your internet shop. There has to be created 3 new pages in your internet shop.

  1. A page for the payment HTML form
  2. A page which your customers are directed to as the payment is approved ( acceptURL )
  3. A page which your customers are directed to as the payment is declined ( declineURL )
  4. A page which the ePay system calls the internet shop system (directly) as the payment is approved( callbackURL )

Before you start

Remind that the payment HTML form has to be showed on a HTTPS encrypted page using a SSL certificate.
We recommend that ePay relay-script is used.

If you want to use your own SSL certificate your company MUST be PCI certified.

Notice: It is not allowed to run the payment HTML form in a frame or iframe as the padlock is not available down in the right corner of the browser.

Page 1: set-up of own HTML payment form

If you are using ePay’s relay-script it is important that all of your pages on the HTML payment form are relative. Is this a problem alternative you can use the ePay Standard Payment Window instead.

Before your tag there must be implemented a form. This form must include parameters, which are transmitted by POST to the ePay auth-script. You can see the parameters to set-up in the documentation below in the section

input: It is important the form is set-up as the example below.

<form action="https://ssl.ditonlinebetalingssystem.dk/auth/default.aspx" method="post"></form>

Page 2: AcceptURL

This is the page in your internet shop, which the customers are directed to as the payment is approved. You set the URL in the parameter

acceptURL

. In the documentation’s section

output acceptURL - you can see parameters which ePay sends to the accept-page (GET).

On the accept-page you must show a receipt to your customer. 

Page 3: DeclineURL

This is the page in your internet shop, which the customer is directed to as the payment is declined. You must set-up the URL in the parameter

declineURL

CallbackURL

To ensure that your internet shop receives an answer from ePay as the payment is approved you can also use the callbackURL. As the payment is approved ePay calls an URL (server to server) at the same time as the customer is sent to the acceptURL. This feature must be used if it is important that your ordering system is updated as the payment is approved.

Own parameters

Do you have a need for sending your own parameters to our auth-script; you can in the HTML payment form set the form hidden fields (user_attr_1 – user_attr_20). The parameters will be sent as GET parameters to the acceptURL or the declineURL whatever the payment was approved or declined. It is important that your own parameters do not conflict with existing ePay parameters.

Example

<input type="hidden" name="accepturl" value="http://www.yourdomain.dk/path/document.html?parameter1=something&parameter2=something_else" />

or

<input type="hidden" name="user_attr_1" value="value of own attribute" />

3D Secure, eDankort, Nordea, BG Bank or Danske Bank

You can use the parameter ”paymenttype” to control the type of payment you would like to use. Is this parameter not defined the payment will be handled as ordinary credit card to PBS and VISA/MasterCard. Is the payment of type 3D secure you must set the paymenttype to the value of 1, 2 or 3 (read more about this in the documentation).

If the payment is of type eDankort the payment type must be set to the value of 20, Nordea: 21, Danske Bank: 22 and BG Bank: 23.

Maintaining sessions

To maintain your customers sessions on the website of your internet shop you must use the field http_cookie.

Technical documentation

  1. Input parametre
  2. Output acceptURL
  3. Output declineurl
  4. Output callbackURL

Input Data type Values Description
paymenttype Integer
0 = Standard payment
17 = EWIRE
20 = eDankort
21 = Nordea
22 = Danske Bank
26 = PayPal
This field set the type of payment to make. The default value is 0.
merchantnumber Integer 7 bytes The unique merchant number created in ePay. This merchant number is to be found in your contract with PBS.
cardno String Max. 20 bytes Creditcardnumber from the cardholders creditcard.

Notice: Is not used for eDankort and banking
expmonth Integer 2 bytes Expire month of the card holder’s credit card.

Notice: Is not used for eDankort and banking
expyear Integer 2 bytes Expire year of the card holder’s credit card.

Notice: Is not used for eDankort and banking
cvc Integer Max. 4 bytes Control cipher of the card holder’s credit card. Is there no control cipher on the credit card set this value to 0.

Notice: Is not used for eDankort and banking
orderid String Max. 20 bytes The order id from your own system. This order id is used as reference between your own system and ePay.

Any numbers from 0-9 and characters from a-Z is allowed.

Please note for Euroline and Swedbank transactions that max 12 characters can be supported.
currency Integer 208 = DKK
978 = EUR
840 = USD
578 = NOK
752 = SEK
826 = GBP

The amount in minor units. E.g. DKK 125,75 must be given as 12575 in the amount field.

The full list of currency codes is available from within the admin area of the payment system.

amount Integer Minor units

The amount in minor units. E.g. DKK 125,75 must be given as 12575 in the amount field.

Please note for subscription payments (recurring payments) where no initial amount is to be received but the subscription has to be created only, this value can be set to 0.

accepturl String Max. 255 bytes The URL the customers are directed to as the payment is approved. In the section Output accepturl you can see the GET parameters ePay uses.
declineurl String Max. 255 bytes The URL the customers are directed to as the payment is declined. In the section Output declineURL you can see the GET parameters ePay uses.
callbackurl String Max. 255 bytes This URL is used to update your ordering system. As the payment is approved ePay calls this URL as it was an acceptURL (server to server).
instantcapture Integer 0 = manual
1 = automatic

Set this field to 1 and the payment is captured instantly. As default this value is 0 and the payment is to be manually captured in the administration of ePay.

Please note that when using Instant Capture for payments to Teller two operations are made. Authorize and capture. Sometimes the capture fails which results in complete decline of the transaction.

group String Max. 100 bytes Which group the payment must be associated.
description String Max. 1024 bytes Description of the payment. This description can be seen in the administration in ePay.
md5key String Max. 255 bytes This field is used to create a MD5 stamp in the internet shop, which is validated by ePay in the auth-script to avoid customers manipulate with the data. The stamp has to be created by following information: MD5(currency + amount + ordreID + "key set-up in ePay").
authsms String Max. 8 bytes If you set a mobile number in the parameter a SMS is sent as the payment is approved. Remind it costs DKK 0,25 for each SMS sent. Works only for production payments
authmail String Max. 100 bytes If you would like to receive an email with information about the payment as it is approved.
cardtype ARRAY
0 = ALL (default)
1 = DANKORT
2 = VISA_DANKORT
3 = VISA_ELECTRON_FOREIGN
4 = MASTERCARD
5 = MASTERCARD_FOREIGN
6 = VISA_ELECTRON
7 = JCB
8 = DINERS
9 = MAESTRO
10 = AMERICAN_EXPRESS
12 = EDK
13 = DINERS_FOREIGN
14 = AMERICAN_EXPRESS_FOREIGN
15 = MAESTRO_FOREIGN
16 = FORBRUGSFORENINGEN
17 = EWIRE
18 = VISA
19 = IKANO
20 = OTHERS
24 = LIC_MASTERCARD
25 = LIC_MASTERCARD_FOREIGN
26 = PAYPAL
If you would like to limit the type of credit cards approved (due to transaction fees). As default the value is ”0” = All. If you would like to accept Dankort and VISA/Dankort only set this parameter to the value of ”1,2” Note!
cardtypes like VISA_ELECTRON and MAESTRO cannot be used for subscriptions!
cardholder String Max. 55 Name of the card holder.
HTTP_COOKIE String Max. 8000 Session / http cookie. Used to maintain your own sessions.
subscription Integer 0 = disabled
1 = enabled
To create a subscription (recurrent payments). If this field is set to the value of 1 you will receive a parameter named subscriptionid on the acceptURL as GET parameter. This subscription identifier can be used to do recurrent payments by use of API or the ePay administration.

Read more about recurrent payments here (subscriptions)

Read more about API here
subscriptionname String Max. 100 bytes Used with the parameter "subscription". If subscription = 1 and a subscription is to be made, you can specify the name / your reference to the subscriber in this field. If this field is not specified, the subscriber is setup with the ordered as name.
transfee Integer Defined in minior units (empty if the fee for the payment is NOT put on the cardholder) Adds the transaction fee to the order totals defined in the amount field.

The value has to be given in minor units. E.g. USD 3.75 has to be given as 375 in the field (cent).
splitpayment Integer 0 = disabled
1 = enabled

Is possible to following cardtypes:
1 = DANKORT
2 = VISA_DANKORT
3 = VISA_ELECTRON_FOREIGN
4 = MASTERCARD
5 = MASTERCARD_FOREIGN
6 = VISA_ELECTRON
7 = JCB
8 = DINERS
9 = MAESTRO
10 = AMERICAN_EXPRESS
13 = DINERS_FOREIGN
14 = AMERICAN_EXPRESS_FOREIGN
15 = MAESTRO_FOREIGN
16 = FORBRUGSFORENINGEN
18 = VISA
19 = IKANO
24 = LIC_MASTERCARD
25 = LIC_MASTERCARD_FOREIGN

It is possible to ship an order over several times (e.g. if it consists of several parts of which has to be ordered before it can be shipped to the customer).

By defining 1 as the value for splitpayment, the payment can be captured several times up against PBS, as the single parts of the order is shipped.

Notice that this function is only supported to some of the card types (standard PBS types). If splitpayment is set as 1 for a cardtype, which doesn't support splitpayment, the payment will be made as an ordinary one, which can be captured only once.

Please notice that splitpayment is not available for 3D secure payments.

use3d Integer 0 = disabled
1 = enabled
2 = accept 3D only

Default 0
Allowing the payment to be made as 3D Secure. If the value is set to 1, the payment will be made, even if card is not enabled for 3D Secure.

If the value set to 2, only the 3D secure validated payments will be accepted.
language Integer 1 = Danish
2 = English
3 = Swedish

Default 1
Defines the language which is returned as "errortext" to the declineURL, if the payment is declined.
instantcallback Integer 1 = Enabled
0 = Disabled

Default 0
If callback should be made before redirect to acceptURL is done.

Normally callback is at first made after redirect to the acceptURL is done.

If the callback fails - retry is made once every hour up to 24 times.
redirectmethod String Possible values:

POST

or

GET

Default GET
If redirect back to the accepturl is by POST or by GET.
httpaccepturl Int Possible values:

1 = enabled
0 = disabled (default)
Redirect to the accepturl is made without the relay-script in front.


Output acceptURL + callbackURL Data type Description
tid Integer Transaction identifier which the payment is created with in the ePay system. (reference to the payment in ePay). If subscription is set to 1 and amount to 0 this field will not occur in the response as not transaction has been made.
orderid String OrderID associated to the payment in ePay (reference to the payment in your own system)
amount Integer Amount authorized on the customer’s credit card. Minor units,
cur Integer Currency code of the payment.
date Date Timestamp of the payment.
time Integer Time when the payment is made. For example, the value "1223" is the time 12:23
eKey String MD5 stamp generated by amount + orderid + tid + secret key. This parameter is only transmitted if you choose the accept MD5 stamp on the accepURL.
fraud Integer This parameter is only transmitted if you choose to enable fraud figther. If fraud figther is enabled this value is 0 if no fraud and 1 if there are any suspicion about fraud for the payment.
HTTP_COOKIE String The cookie of your internet shop which is used to maintain sessions. You must set the cookie again on your acceptURL.
subscriptionid Integer If the parameter "subscription=1" is send the auth-script and the subscription is created the unique identifier for the subscription is transmitted as this parameter.
cardid Integer Which paymentcard the payment is completed with. See the different cardtypes here.
cardnopostfix Integer Postfix is the last 4 digits of card number on the card, the customer has used. Can be used for presentation of the receipt to the customer.
tcardno String Truncated cardnumber formatted like 444444XXXXXX4444.
payercountry String If Fraud Fighter is enabled the country code of the payer is returned in ISO 3166 format(AN2)
issuercountry String If Fraud Fighter is enabled the country code of card issuer is returned in ISO 3166 format(AN2)


Output declineURL Data type Description
error Integer Error code from PBS if the payment is declined. In the ePay administration you will find the complete list of PBS error codes.
orderid String OrderID associated to the payment in ePay (reference to the payment in your own system)
HTTP_COOKIE String The cookie of your internet shop which is used to maintain sessions. You must set the cookie again on your acceptURL.
errortext String Description of the error.


This article was:   Helpful | Not Helpful
Also read
document Payment logos
document ePay logos
document Error codes
document Secure your own payment form using ePay relay-script
document MD5
document Callback
document Split payment
document Test own payment form
document Currency codes
document Introduction to the ePay code examples
document How to implement the ePay integrated payment form using plain HTML
document How to implement MD5 security check up against ePay using .NET (C-SHARP)
document How to implement the ePay integrated payment form using .NET (C-SHARP)
document How to implement the ePay integrated payment form using PHP
document How to implement MD5 security check up against ePay using PHP
document Recurring payments

Prev   Next
Integrated payment form     Secure your own payment form using ePay relay-script