Business::OnlinePayment::IPayment::Return - Helper class for Ipayment SOAP ipaymentReturn
my $bopi = Business::OnlinePayment::IPayment->new(....) # do the preauth transaction and post my $response = $ua->post($secbopi->ipayment_cgi_location, { ... }); # get the parameters my $ipayres = $bopi->get_response_obj($response->header('location')); # here we have our Business::OnlinePayment::IPayment::Return object my $return = $bopi->capture($ipayres->ret_trx_number); if ($return->is_success) { print $return->address_info, "\n", $return->ret_transdate, "\n", $return->ret_transtime, "\n", $return->trx_paymentmethod, "\n", $return->ret_trx_number, "\n", $return->ret_authcode, "\n", $return->trx_paymentdata_country, "\n" } elsif($return->is_error) { print $return->status, $return->error_info }
We get this from the response hashref from the SOAP server
Hashref with the error details
{ 'retAdditionalMsg' => 'Not enough funds left (28184) for this capture.', 'retFatalerror' => 0, 'retErrorMsg' => 'Capture nicht m', 'retErrorcode' => 10031 }
Status string (ERROR or SUCCESS)
Hashref with the success details
{ 'retTransDate' => '17.04.13', 'retTrxNumber' => '1-84664243', 'retTransTime' => '10:34:10', 'retAuthCode' => '', 'retStorageId' => '18895061', # if storage is used 'trxPayauthStatus' => 'I', # 3D detail 'trxIssuerAvsResponse' => 'A', # avs detail } }
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.
Iso code of the IP which does the transaction.
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.
Hashref with the details of the cardholder's address
Return true if the transaction was successful, false otherwise
Return true if there is an error and the SOAP service says so.
The various AddressData fields combined in a single string. It could return just an empty string.
Given that if you need to access the individual fields of the error, the method errorDetails is available, you may want to use this for a stringified message, which basically combine all the 4 fields.
errorDetails
Date of the transaction, time of the transaction, and the two combined.
Transaction number, as returned by the IPayment server
Auth code, as returned by the IPayment server
The storage id (if used).
AVS related response.p. 62 of the doc
3D-related response, p. 62 of the doc
The error code. 0 in case of success
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.