Moving apiContext creation to a function

This commit is contained in:
aydiv
2013-08-26 14:20:25 +05:30
parent a3e0e8b1d1
commit 9dd6cd07bc
2 changed files with 46 additions and 27 deletions

View File

@@ -48,7 +48,7 @@ $refund->setAmount($amt);
try {
// Create a new apiContext object so we send a new
// PayPal-Request-Id (idempotency) header for this resource
$apiContext = new ApiContext($apiContext->getCredential());
$apiContext = getApiContext();
$captureRefund = $capture->refund($refund, $apiContext);
} catch (PayPal\Exception\PPConnectionException $ex) {