PHP Extension PiConnect - Cloud: Get Credit Sale

Back to Index

Get a Credit Sale

Documentation: https://api-cloud.piconnect.io/#a8f66051-d98a-c0e4-b4ec-f341cdc9c7a9

CURL Command

curl --request GET \
  --url 'https://pipay.io/piconnect/cloud?method=creditsale&account=1512407959&sn=31415926&cloud=app&amount=21.03&ticketid=R212203&userid=Cristy'

PHP Extension Example

<?php

// The version number (9_5_0) should match version of the Chilkat extension used, omitting the micro-version number.
// For example, if using Chilkat v9.5.0.48, then include as shown here:
include("chilkat_9_5_0.php");

$rest = new CkRest();

//  URL: https://pipay.io/piconnect/cloud?method=creditsale&account=1512407959&sn=31415926&cloud=app&amount=21.03&ticketid=R212203&userid=Cristy
$bTls = true;
$port = 443;
$bAutoReconnect = true;
$success = $rest->Connect('pipay.io',$port,$bTls,$bAutoReconnect);
if ($success != true) {
    print 'ConnectFailReason: ' . $rest->get_ConnectFailReason() . "\n";
    print $rest->lastErrorText() . "\n";
    exit;
}

$sbResponseBody = new CkStringBuilder();
$success = $rest->FullRequestNoBodySb('GET','/piconnect/cloud?method=creditsale&account=1512407959&sn=31415926&cloud=app&amount=21.03&ticketid=R212203&userid=Cristy',$sbResponseBody);
if ($success != true) {
    print $rest->lastErrorText() . "\n";
    exit;
}


?>