Please follow the links below to read the documentation specific to your gateway:
AuthorizeNet
| BluePay
| CyberCash
| Echo Inc.
| ESec
| FirePay
| GO Software(PCCharge)
iBill | Innovative
Gateway | IntelliPay
| Iongate | IPayment
| LinkPoint | NovaInfo
| PayBill
PayPal | PaySystems
| Plug-n-Pay | Qenta
| Skipjack | TeleCash
| VeriSign | WorldPay
Qenta
Qenta is a company based in Austria. Qenta supports transactions
multiple currencies.
What you need to start
You receive from Qenta a merchant ID.
Gateway Configuration Data
The Qenta product homepage is under: http://www.qenta.at/
Qenta returns unchanged all the form fields that do not conflict
with their own fields. We chose the "QentaCustom"
to return the custom data field.
Code to use for The CITY Shop
This is the code that you will put/modify in the ShopSetup.pm:
-MERCHANT_DATA_MAP => {
'Qenta' => { -GATEWAY_NAME => 'Qenta',
-MERCHANT_ID => 'xxxxx',
-EXTERNAL_METHOD => 1, },
},
...
If you configure this for The CITY Shop, that is all you
need to know, and you can return to the installation instructions.
Description of the used parameters:
-MERCHANT_ID
This is the Qenta email that you want to use to receive money.
-EXTERNAL_METHOD
This will ALWAYS have to stay on 1, and means that this gateway
uses an alternate submission method. It is very important for The
CITY Shop to help determine the right course of action, but is not
used by the EPI internally.
Here are some extra parameters that you can use if you implement
the EPI in other scripts:
-LOG_ACTIVITY
This is a flag that you can set on "1" if you want
to log the callbacks
-LOG_FILE_PATH
This is the path where the log file will be created. Note that
this is a path only, and the script will create there a file
named "QENTA.log"
-TRANSACTION_DATA
For passing back specific parameters, you can assign that value
to this key, and the same value will be returned to you by the gateway
callback post, in the response hash.
-GATEWAY_SUCCESS_LINK
This is the URL of the script that will be used to post back the
data if the transaction is successful.
-GATEWAY_CANCEL_LINK
This is the URL of the script that will be used to post back the
data if the transaction is cancelled by the user.
-GATEWAY_FAILURE_LINK
This is the URL of the script that will be used to post back the
data in case a failure occurs during the transaction.
-GATEWAY_SERVICE_LINK
The customer can call this page through the SETWallet to receive
contact information from the your
online-shop.
Sample code for your custom scripts
The CITY Shop automatically uses the right combination of routines,
the code that follows is not intended for
use in The CITY Shop!
Please be aware that the example code that follows is not a full
script. Implementing this code in your script might need a certain
level of customization to make it work, i.e. changing variable names,
executing certain routines, printing results, etc..
Since the Qenta gateway uses an external/remote payment method,
you will not use the default method to submit a transaction, as
the "normal" gateways.
STEP 1
First you print on your screen a form that will be redirecting
the user to Qenta, as used by the shop in the routine PaymentQentaVIEW.pm:
...
my $OrderID = time();
my $Total = '10.00';
my $OCurrency = 'USD';
my $CustomField = 'Shop custom data';
my $MerchantData = { -GATEWAY_NAME => 'Qenta',
-MERCHANT_ID => 'xxxxx',
-GATEWAY_SUCCESS_LINK => 'http://www.mydomain.com/cgi-bin/process_callback.cgi', -GATEWAY_CANCEL_LINK => 'http://www.mydomain.com/cgi-bin/process_callback.cgi', -GATEWAY_FAILURE_LINK => 'http://www.mydomain.com/cgi-bin/process_callback.cgi', -GATEWAY_SERVICE_LINK => 'http://www.mydomain.com/about_us.html', -EXTERNAL_METHOD => 1, };
use EPI;
my $Merchant = new EPI($MerchantData);
my $MForm = {
-ORDER_NUMBER => $OrderID,
-ORDER_CURRENCY => $OCurrency,
-ORDER_AMOUNT => $Total,
-TRANSACTION_DATA => $CustomField,
};
my %FormData = $Merchant->_prepare_form_data($MForm);
print qq~<form action="$FormData{-ACTION}" method="$FormData{-METHOD}">$FormData{-HIDDEN}
<input type=submit name="Submit" value="Pay With Qenta!"></form>~;
...
There is an alternate way to display the form, if you don't need
any fancy in the form display. You can use the method in scalar
context, printing the result directly:
my $FormData = $Merchant->_prepare_form_data($MForm);
print $FormData;
STEP 2
Then, Qenta returns a hidden POST, using the URL assigned
to the action. Your script should use the following method, very
similar with the one used by the shop in the PaymentLib.pm. Note
that the form input data is contained in the anonymous hash $FX.
...
my $IsBrowser = $ENV{'HTTP_USER_AGENT'} ? 1 : 0; my $MerchantData = { -GATEWAY_NAME => 'Qenta',
-MERCHANT_ID => 'xxxxx',
-EXTERNAL_METHOD => 1,
-LOG_ACTIVITY => 1,
-LOG_FILE_PATH => './logs',
};
use EPI;
my $Merchant = new EPI($MerchantData);
my $Response = $Merchant->_process_callback($FX);
if ($Response->{-OK}) {
# put here code to enable order processing
my $CustomField = $Response->{-TRANSACTION_DATA} || '';
print 'Transaction OK, here is the custom field: '.$CustomField;
}
else {
print $Response->{-ERROR};
}
...
|