Business::OnlinePayment::IPayment::Response - Helper class for Ipayment responses
# where %params are the GET parameters $ipayres = Business::OnlinePayment::IPayment::Response->new(%params); $ipayres->set_credentials( my_amount => "5000", my_currency => "EUR", my_userid => "99999", my_security_key => "testtest", ); ok($ipayres->is_success && $ipayres->is_valid, "Payment looks ok");
Time of transaction.
Date of the transaction.
The error code of 0 means that the transaction was successful. When in a CGI integration mode parameter redirect_needed returned with the value 1 is the only means that all data is correct and a redirect must be running. The return value is meaningful only after a second call.
This parameter is set if the payment could not be completed because of a redirect necessary.
Error message (in German). This is important to propagate to the web interface.
Additional Error message, sometimes in English, sometimes inexistent.
This value is returned only if an error has occurred.
Based on this value, your shop offer the buyer the option of payment data correct as long as there is no fatal error. Fatal errors are usually disruptions in Bank network or other problems where a new trial is expected no Improvement brings. Your customers, you can in this case, a specific error message
Data type: string, maximum 100 characters Name of the buyer. This parameter is required for all payments.
Data type: string, maximum 80 characters
E-mail address of the buyer. If this field is filled in, the e-mail address is checked for plausibility.
City
ZIP code
ISO country code (2 chars, not 3 as the documentation says)
Second street.
(USA only), two chars.
Telephone, max 30 chars
Telefax, max 30 chars
In this parameter the name of the medium used, payment will be returned. the For example, a credit card type (such as Visa or MasterCard) or ELV.
Authorization number of third party payment for this transaction or other unique Identification of the payment the payment provider. The parameters may in certain cases be empty.
Currency in which the payment is processed. There are all known three-letter ISO Currency codes allowed. A list of known currency codes, see https://ipayment.de/ under Technik.
Note that the processing of payments in the currency must be agreed with your payment provider.
IP of the client who did the transaction
See transactionType in Business::OnlinePayment::IPayment
transactionType
If the status is SUCCESS, here we have the Unique transaction number (reservation number) of ipayment system. this number is returned in the form of "x-xxxxxxx", where x is a single digit. with this Transaction number, you can perform other actions such as charging or cancellations.
SUCCESS
The possible values are:
SUCCESS: The transaction has been successfully completed.
ERROR: In transaction processing, an error occurred.
ERROR
REDIRECT: To further processing must be performed a redirect (3-D secure, verification needed)
REDIRECT
Values: cc (Credit card), elv (ELV), pp (Prepaid payment)
cc
elv
pp
In this parameter, if possible, the ISO code of the country returned to the the payment data belongs. The field contains, for example, for credit card payments, the country the card-issuing bank and ELV payments the bank country.
Amount to be debited. Enter the value in the smallest currency unit, for Example cents. Decimal points or other characters except numbers are not allowed.
For example, the amount of EUR 10.00 is given as 1000 cents.
Used for the checksum and apparently not documented.
See trxuserId in Business::OnlinePayment::IPayment
trxuserId
Iso code of the IP which does the transaction
Optional data returned by the Ipayment server if the cgi parameter return_paymentdata_details is set to 1 (no SOAP for this, you have to add an hidded input field in the form).
return_paymentdata_details
The credit card number is returned masked with the last 4 digits visible.
You need to set the my_amount attribute if you want to check the hash.
my_amount
Our trxuser_id
Our currency
The security key
The cart->id of the transaction
In payment processing with the below payment provider you can use a Specify text that is sent to the payment provider. This text if the debiting more precisely describe. Depending on the payment providers and credit cards out bender site This text is printed on the card account of the customer and / or dealer. If this parameter is not set, ipayment automatically uses the company name merchant that you specified in the configuration menu ipayment under General Data
This can be sent into the options as options-{invoiceText}>
options-
Comment that is stored in the transaction in ipayment system. this comment is not sent to the bank or payment processor.
This can be sent into the options as options-{trxUserComment}>
The date as returned by the ipayment server (like: 2008/09/15)
The storage id for the current transaction.
AVS related response.p. 62 of the doc
3D-related response, p. 62 of the doc
As a shortcut, you can set the above attribute using this method
Return true if the transaction was successful, undef otherwise
Return true if the transaction raised an error, undef otherwise. You can access the German error message with the accessor ret_errormsg
ret_errormsg
Return true if the servers return a checksum (for this you have to build a session with trx_securityhash for this to work, and you shoul use the app_security_key).
trx_securityhash
CGI Name: ret_param_checksum Data type: String
ret_param_checksum
The hash is the md5sum of the concatenation of trxuser_id trx_amount, trx_currency, ret_authcode, ret_booknr and transaction security key.
trxuser_id
trx_amount
trx_currency
ret_authcode
ret_booknr
If one of the fields is empty or not returned, use the empty string.
The checksum is only in case of success of a transaction (ret_errorcode = 0 and redirect_ needed = 0) are available.
perl -e 'use Digest::MD5 qw/md5_hex/; print md5_hex("99998" . 5000 . "EUR" . "" . "1-83400472" . "testtest");' # => 6bff5d51a44f048e887d1ab7677c4798 and it matches
With this accessor you are able to lookup the validation errors found
Accessor for the raw, undecoded url (used for the checksum).
You may ask for the validation of the url, which comes with a checksum attached. For this you should have already provided the security key and you should pass the raw undecoded url as argument.
Alternatively, if you set the attribute raw_url in the constructor or with the accessor, you can call url_is_valid without arguments.
raw_url
Return false on failure, true on success
Original German doc (left in place because the translation was drunk).
CGI-Name: ret_url_checksum Webservice-Name: - (nicht benötigt) Datentyp: String
Wenn Sie für eine Transaktion eine Anwendung mit einem Security-Key verwendet haben, wird dieser Parameter mit einem MD5-Hash an die Rücksprungs-URL angehängt.
Für die Bildung des Hash wird an die Rücksprungs-URL ein & und der Transaktions-Security- Key der Anwendung angehängt. Für diese Zeichenkette wird die MD5-Prüfsumme generiert. Der ermittelte Hash wird als Parameter ret_url_checksum an die Rücksprungs-URL hinter alle anderen Parameter an das Ende angehängt.
Um die Prüfsumme zu überprüfen müssen Sie den Parameter ret_url_checksum von der vollständigen URL des aufgerufenen Scriptes abschneiden, den Transaktions-Security-Key anhängen und dann die MD5-Prüfsumme ermitteln. Wenn die Prüfsumme nicht mit dem Wert des Parameters ret_url_checksum übereinstimmt, liegt vermutlich eine Manipulation der URL vor.
Shortcut that combines the cardholder details, separated by a whitespace
To install Business::OnlinePayment::IPayment, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Business::OnlinePayment::IPayment
CPAN shell
perl -MCPAN -e shell install Business::OnlinePayment::IPayment
For more information on module installation, please visit the detailed CPAN module installation guide.