How to query payment ID after Checkout

Follow

If you need to pull the transaction response from our system you would need to make the following call as shown below. This call requires you to have the "id" value from the transaction response you received above using Get Payment Status.

The final response delivered to your system looks like this:

payload: {"id":"8a82944a5028ad6xxxxxxxx1ed285180","registrationId":"8a829449xxxxxxxx01503771eaf4533b","paymentType":"DB","paymentBrand":"VISA","amount":"2000.00","currency":"ZAR","descriptor":"9347.7571.8562 PP01 Nedbank","result":{"code":"000.100.110","description":"Request successfully processed in 'Merchant in Integrator Test Mode'"},"card":{"last4Digits":"*","holder":"Johnny Bravo","expiryMonth":"12","expiryYear":""},"risk":{"score":""},"timestamp":"2015-10-05 10:00:24+**","ndc":"4B7BFA7xxxxxx4627B49ECA42.sbg-vm-tx02"}

 

The sample code to pull a transaction response from the system using the "id" value looks like this:

<?php

function getPaymentStatus($txid) {
$url = "https://test.oppwa.com/v1/payments/" . $txid .
"?authentication.userId=ff808081392eb9b201392f0b6d0200a3" .
"&authentication.password=wCJFfx6F" .
"&authentication.entityId=ff808081392eb9b201392f0bfe3800a9";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if(curl_errno($ch)) {
return curl_error($ch);
}
curl_close($ch);
return json_decode($response, true);
}
$status = getPaymentStatus("8a829449xxxxxxxxxx4f08f22a99xxxx");
print_r($status);

?>

 

Should you have any questions, feel free to email us at support@peachpayments.com

Have more questions? Submit a request

Comments

Powered by Zendesk