public static get ( string $saleId, |
||
$saleId | string | |
$apiContext | is the APIContext for this call. It can be used to pass dynamic configuration and credentials. | |
$restCall | PayPalRestCall | is the Rest Call Service that is used to make rest calls |
return |
public static function get($saleId, $apiContext = null, $restCall = null)
{
ArgumentValidator::validate($saleId, 'saleId');
$payLoad = "";
$json = self::executeCall("/v1/payments/sale/{$saleId}", "GET", $payLoad, null, $apiContext, $restCall);
$ret = new Sale();
$ret->fromJson($json);
return $ret;
}
public function stupdate($transactionId, $apiContext) { if ($transactionId) { $sale = Sale::get($transactionId, $apiContext); $data = array('state' => $sale->getState()); $this->getDbTable()->update($data, array('transaction_id = ?' => $transactionId)); return $data['state']; } }