void() публичный Метод

Voids, or cancels, an authorization, by ID. You cannot void a fully captured authorization.
public void ( ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Authorization
$apiContext PayPal\Rest\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
Результат Authorization
Пример #1
0
 /**
  * @dataProvider mockProvider
  * @param Authorization $obj
  */
 public function testVoid($obj, $mockApiContext)
 {
     $mockPPRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock();
     $mockPPRestCall->expects($this->any())->method('execute')->will($this->returnValue(self::getJson()));
     $result = $obj->void($mockApiContext, $mockPPRestCall);
     $this->assertNotNull($result);
 }
Пример #2
0
 public function voidAuthorizedTransactionRequest(Authorization $authorization)
 {
     $apiContext = $this->contextFactory->createContext();
     return $authorization->void($apiContext);
 }