The payex extension makes you able to use the Scandinavian payment engine PayEx from DG3 bu just adding merchant number, encryption key, currency and VAT to use. Just download the extension and unzip it to your DG3App\extensions folder (create one if this is the first) and restart DG3.

Url parameters to use to create an order

The /payex/createorder/ page will use the following url parameters to create a new order and return you to the payment page.

orderno The order number you use in your system to represent an order. This is added as a key for both urls.
productno Your product number if you have any
description Your description of the order
price The price that should be payed including taxes like VAT. This is what you want to be charged on the customers credit card.
next The url you return to after order is fully paid. The url should be in the form /folder/page/ and the orderno=[{orderno}] is added to the end of the url.
vat No need to add to use the default from settings or add your own in the the form of a number between 0 and 1 (ex. 0.25 for 25% VAT)
currency No need to add to use the default from settings or add NOK, SEK or DKK.
cancelurl The return url return to if the user press the cancel button in the PayEx payment page
language The language to use for the payment pages. If not set, the payment engine will try to guess based on browser settings.
noredirect Setting this parameter will result in showing the redirect url instead of redirect to it. The url and the orderref is added as livetext with the names 'redirecturl' and 'orderref' and the 'result'='ok' is added to let you check for success or error.
additional This can be used to add special payex parameters to set how their side is going to look. Default is 'RESPONSIVE=1'

Results on createorder page

When a payment request is done, you will get a result back to your pages on failure or when noredirct paramer is set. This is what gets returned.

result Returns failed when error and ok when no redirect is set.
pxresult This is a collection of the results from PayEx, if you do not have errors from the create order method, this will be empty. If it is a from the payment engine, it will be filled by values as listed below.
pxresult.isok
pxresult.errorCode
pxresult.errormsg
pxresult.description
pxresult.paramName
pxresult.thirdPartyError
redirecturl If you set the noredirect parameter, this is returned as a livetext if result is ok. This is the url that is used to do the payment in the payex engine. You can click on the link or send it in mail.
orderref If you set the noredirect parameter, this is returned as a livetext if result is ok. This is the internal order reference that can be used to locate this order on the payex server.