NAME

Business::OnlinePayment::IPayment::Return - Helper class for Ipayment SOAP ipaymentReturn

SYNOPSIS

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
}

ACCESSORS

We get this from the response hashref from the SOAP server

errorDetails

Hashref with the error details

{
'retAdditionalMsg' => 'Not enough funds left (28184) for this capture.',
'retFatalerror' => 0,
'retErrorMsg' => 'Capture nicht m',
'retErrorcode' => 10031
}
status
ret_status

Status string (ERROR or SUCCESS)

successDetails

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
}                                                                   }
trx_paymentmethod
paymentMethod

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.

trx_remoteip_country
trxRemoteIpCountry

Iso code of the IP which does the transaction.

trx_paymentdata_country
trxPaymentDataCountry

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.

addressData

Hashref with the details of the cardholder's address

is_success

Return true if the transaction was successful, false otherwise

is_error

Return true if there is an error and the SOAP service says so.

address_info

The various AddressData fields combined in a single string. It could return just an empty string.

error_info

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.

ret_transdate
ret_transtime
trx_timestamp

Date of the transaction, time of the transaction, and the two combined.

ret_trx_number

Transaction number, as returned by the IPayment server

ret_authcode

Auth code, as returned by the IPayment server

storage_id

The storage id (if used).

trx_issuer_avs_response

AVS related response.p. 62 of the doc

trx_payauth_status

3D-related response, p. 62 of the doc

ret_errorcode

The error code. 0 in case of success