From 8e387a31594dab32aecad0aa8d14aaf20d8d9712 Mon Sep 17 00:00:00 2001 From: lathavairamani Date: Thu, 30 May 2013 16:44:53 +0530 Subject: [PATCH] updated variable names in sample --- sample/payments/AuthorizationCapture.php | 12 ++++++------ sample/source/AuthorizationCapture.html | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sample/payments/AuthorizationCapture.php b/sample/payments/AuthorizationCapture.php index ab414f2..52345fa 100644 --- a/sample/payments/AuthorizationCapture.php +++ b/sample/payments/AuthorizationCapture.php @@ -22,9 +22,9 @@ $amt->setCurrency("USD"); $amt->setTotal("1.00"); ### Capture -$captur = new Capture(); -$captur->setId($authId); -$captur->setAmount($amt); +$capture = new Capture(); +$capture->setId($authId); +$capture->setAmount($amt); // get the authorization $authorization = Authorization::get($authId, $apiContext); @@ -34,7 +34,7 @@ $authorization = Authorization::get($authId, $apiContext); // using a valid ApiContext (See bootstrap.php for more on `ApiContext`) // The return object contains the status; try { - $capt = $authorization->capture($captur, $apiContext); + $getCapture = $authorization->capture($capture, $apiContext); } catch (\PPConnectionException $ex) { echo "Exception: " . $ex->getMessage() . PHP_EOL; var_dump($ex->getData()); @@ -45,10 +45,10 @@ try {
Capture payment: - getId();?> + getId();?>
-		toArray());?>
+		toArray());?>
 	
Back diff --git a/sample/source/AuthorizationCapture.html b/sample/source/AuthorizationCapture.html index 2bcf992..cd22334 100644 --- a/sample/source/AuthorizationCapture.html +++ b/sample/source/AuthorizationCapture.html @@ -17,14 +17,14 @@ API used: /v1/payments/payment

$amt->setTotal("1.00"); ### Capture -$captur = new Capture(); -$captur->setId($authId); -$captur->setAmount($amt);

get the authorization

$authorization = Authorization::get($authId, $apiContext);

Capture Payment

+$capture = new Capture(); +$capture->setId($authId); +$capture->setAmount($amt);

get the authorization

$authorization = Authorization::get($authId, $apiContext);

Capture Payment

Capture Payment by posting to the APIService using a valid ApiContext (See bootstrap.php for more on ApiContext) The return object contains the status;

try { - $capt = $authorization->capture($captur, $apiContext); + $getCapture = $authorization->capture($capture, $apiContext); } catch (\PPConnectionException $ex) { echo "Exception: " . $ex->getMessage() . PHP_EOL; var_dump($ex->getData()); @@ -35,10 +35,10 @@ The return object contains the status;

<body> <div> Capture payment: - <?php echo $capt->getId();?> + <?php echo $getCapture->getId();?> </div> <pre> - <?php var_dump($capt->toArray());?> + <?php var_dump($getCapture->toArray());?> </pre> <a href='../index.html'>Back</a> </body>