Updating stubs and samples to use apiContext

This commit is contained in:
aydiv
2013-04-26 12:00:20 +05:30
parent c624834f15
commit b3423b6c11
28 changed files with 931 additions and 1040 deletions

View File

@@ -144,8 +144,8 @@ class Sale extends Resource implements IResource {
if($apiContext == null) {
$apiContext = new ApiContext(self::$credential);
}
$call = new \PPRestCall();
$json = $call->execute($apiContext, array('PayPal\Rest\RestHandler'),
$call = new \PPRestCall($apiContext);
$json = $call->execute( array('PayPal\Rest\RestHandler'),
"/v1/payments/sale/$saleid",
"GET", $payLoad);
$ret = new Sale();
@@ -171,8 +171,8 @@ class Sale extends Resource implements IResource {
if($apiContext == null) {
$apiContext = new ApiContext(self::$credential);
}
$call = new \PPRestCall();
$json = $call->execute($apiContext, array('PayPal\Rest\RestHandler'),
$call = new \PPRestCall($apiContext);
$json = $call->execute( array('PayPal\Rest\RestHandler'),
"/v1/payments/sale/{$this->getId()}/refund",
"POST", $payLoad);
$this->fromJson($json);