GetDailyTransactions Example

Below is an example page which will call GetDailyTransactions and display some information from it.
There is also a GetDailyTransactionsCSV function available.

For the technical details of the API call, click here.

You need to specify:

  • Your Merchant and Authentication codes
  • The date for the transactions you wish to check

  • PHP
  • C#
Loading ...
<?php
$token = $_POST["Token"];
if(is_null($token)) {
	$token = $_GET["token"];
}
 
 $auth = base64_encode("PriceBusterDVD_AU:MyPassword1!");
 $header = array();
 $header[] = 'Authorization: Basic '.$auth;
 $date = "14/08/2014";
 
 $ch = curl_init("https://poliapi.apac.paywithpoli.com/api/Transaction/GetDailyTransactions?date=".$date);
 //See the cURL documentation for more information: http://curl.haxx.se/docs/sslcerts.html
 //We recommend using this bundle: https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt
 curl_setopt( $ch, CURLOPT_CAINFO, "ca-bundle.crt");
 curl_setopt( $ch, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);
 curl_setopt( $ch, CURLOPT_HTTPHEADER, $header);
 curl_setopt( $ch, CURLOPT_HEADER, 0);
 curl_setopt( $ch, CURLOPT_POST, 1);
 curl_setopt( $ch, CURLOPT_POSTFIELDS, $json_builder);
 curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 0);
 curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
 $response = curl_exec( $ch );
 curl_close ($ch);
 
 $json = json_decode($response, true);
 
 print_r($json);
?>

There are other integration steps required for a complete integration. Return to the Integration Overview to understand and complete the remaining integration work.

dailyexample.txt · Last modified: 2017/01/20 10:11 (external edit)