-
Notifications
You must be signed in to change notification settings - Fork 1
Payment Info
Guilherme Pressutto edited this page Jun 7, 2017
·
1 revision
You can get information about a payment by searching by a Payment Hash or by a Merchant Payment Code:
// By Hash
EBANX($config)->paymentInfo()->findByHash('HASH_HERE');
// By Merchant Payment Code
EBANX($config)->paymentInfo()->findByMerchantPaymentCode('MERCHANT_PAYMENT_CODE_HERE');
Optionally you may set if the payment was created on Sandbox or Live mode by passing the second argument $isSandbox
:
EBANX($config)->paymentInfo()->findByHash('HASH_HERE', true); //Sandbox mode
EBANX($config)->paymentInfo()->findByHash('HASH_HERE', false); //Live mode
If you don't specify the payment mode the default used will $config->isSandbox
from the Config object you've passed on EBANX()
function.
The result of any of these options will be something like this:
Array
(
[payment] => Array
(
[hash] => 5925f3653b2c75e9ce7568d4f16c6d67648b8e92f7f05fa5
[pin] => 484939887
[merchant_payment_code] => 27c251a65a854cfa74d052e66bdac8e8
[order_number] =>
[status] => PE
[status_date] =>
[open_date] => 2017-05-24 17:56:05
[confirm_date] =>
[transfer_date] =>
[amount_br] => 152023.00
[amount_ext] => 64.55
[amount_iof] => 0.00
[currency_rate] => 2355.1200
[currency_ext] => USD
[due_date] => 2017-05-27
[instalments] => 1
[payment_type_code] => baloto
[baloto_url] => https://sandbox.ebanx.com/print/baloto/execute?hash=5925f3653b2c75e9ce7568d4f16c6d67648b8e92f7f05fa5
[voucher_id] => 484939887
[pre_approved] =>
[capture_available] =>
[note] => Fake payment created by PHPUnit.
[customer] => Array
(
[document] => 932221309
[email] => [email protected]
[name] => LUNA GRANADOS
[birth_date] => 1966-05-31
)
)
[status] => SUCCESS
)