category OSS
package OSS_PaymentProcessor
subpackage OSS_PaymentProcessor_Realex
copyright Copyright (c) 2007 - 2012, Open Source Solutions Limited, Dublin, Ireland
license New BSD License

 Methods

Creates an SHA1 hash for a 'card-new' realEx transaction.

creditCard(string $timeStamp, string $merchantId, string $orderId, string $payerRef, string $cardHolder, string $cardNumber, string $secret) : string
Static

Parameters

$timeStamp

string

in YYYYmmddhhmmss format

$merchantId

string

this merchant id in Realex

$orderId

string

a unique realEx order id

$payerRef

string

unique payer reference id

$cardHolder

string

the card holder's name

$cardNumber

string

the credit card number

$secret

string

The shared secret

Returns

string

Creates an SHA1 hash for 'payer-new' realEx transaction.

payer(string $timeStamp, string $merchantId, string $orderId, string $payerRef, string $secret) : string
Static

Parameters

$timeStamp

string

in YYYYmmddhhmmss format

$merchantId

string

this merchant id in Realex

$orderId

string

a unique realEx order id

$payerRef

string

unique payer reference id

$secret

string

The shared secret

Returns

string

Creates an SHA1 hash for a 'receipt-in' realEx transaction.

payment(string $timeStamp, string $merchantId, string $orderId, string | int | float $amount, $currency, string $payerRef, string $secret) : string
Static

Parameters

$timeStamp

string

in YYYYmmddhhmmss format

$merchantId

string

this merchant id in Realex

$orderId

string

a unique realEx order id

$amount

stringintfloat

the value of the transaction in the smallest unit of the currency, e.g. in cent for euro or dollar

$currency

$payerRef

string

unique payer reference id

$secret

string

The shared secret

Returns

string

Creates an refund hash for an 'card-cancel-card' realEx transition.

refund(string $refundPassword, string $secret) : string
Static

Parameters

$refundPassword

string

refund password assigned by Realex

$secret

string

The shared secret

Returns

string

Creates an SHA1 hash for an 'card-cancel-card' realEx transition.

removeCreditCard(string $timeStamp, string $merchantId, string $payerRef, string $creditCardRef, string $secret) : string
Static

Parameters

$timeStamp

string

in YYYYmmddhhmmss format

$merchantId

string

this merchant id in Realex

$payerRef

string

unique payer reference id

$creditCardRef

string

unique creditcard reference id

$secret

string

The shared secret

Returns

string

Calculate the SHA1 hash from a Realex response (as an array)

response(array $resp, string $secret) : string
Static

Parameters

$resp

array

The parsed Realex XML response as an array

$secret

string

The shared secret

Returns

stringThe calculated SHA1 hash

Creates an SHA1 hash for an 'eft-update-expiry-date' realEx transition.

updateCreditCard(string $timeStamp, string $merchantId, string $payerRef, string $creditCardRef, string $validTo, string $secret) : string
Static

Parameters

$timeStamp

string

in YYYYmmddhhmmss format

$merchantId

string

this merchant id in Realex

$payerRef

string

unique payer reference id

$creditCardRef

string

unique creditcard reference id

$validTo

string

the expiry date of the card in 'YYYY-MM' or 'YYYY-mm-dd' format

$secret

string

The shared secret

Returns

string