/home/desid573/public_html/gcdriver
NameSizeModeActions
assets/-0755rm
lib/-0755rm
payment/-0755rm
PHPMailer/-0755rm
square/-0755rm
array.php22000644editdlrm
a_name_address.php9590644editdlrm
class.phpmailer.php1409010644editdlrm
class.pop3.php103850644editdlrm
class.smtp.php403430644editdlrm
error_log417350644editdlrm
gcpathfinder.png20880644editdlrm
gcsedan.png26360644editdlrm
index.php833740644editdlrm
logo.jpg249910644editdlrm
newJob.php71760644editdlrm
PHPMailer.zip2553920644editdlrm
style.json10140644editdlrm
test.php9770644editdlrm
test2.php9320644editdlrm
test3.php12690644editdlrm
thankyou.php216670644editdlrm
typeConfig.php14600644editdlrm
Edit: /home/desid573/public_html/gcdriver/test3.php (1269B)
setHost("https://connect.squareupsandbox.com"); $api_config->setAccessToken($access_token); $api_client = new \SquareConnect\ApiClient($api_config); $apiInstance = new SquareConnect\Api\PaymentsApi($api_client); $body = new \SquareConnect\Model\CreatePaymentRequest(); // Set your customer_id and customer_card_id $body->setSourceId("ccof:0ecL6VchwaJTqeSK4GB"); $body->setCustomerId("AXTKZ34RXCRTSAJKC8T8P91630"); // Set the payment information $body->setIdempotencyKey("1234564"); $body->setAutocomplete(true); $body->setReferenceId("ref123"); // Set the charge amount to 10 USD $chargeAmount = new SquareConnect\Model\Money(); $chargeAmount->setAmount(100); $chargeAmount->setCurrency("AUD"); $body->setAmountMoney($chargeAmount); //make the call try { $result = $apiInstance->createPayment($body); print_r($result); echo $result["payment"]["status"]."
"; echo $result["payment"]["total_money"]["amount"]; } catch (Exception $e) { echo 'Exception when calling PaymentsApi->createPayment: ', $e->getMessage(), PHP_EOL; } ?>