Authorizes an order, by ID. Include an amount object in the JSON request body.
public authorize ( |
||
$authorization | Authorization Object with Amount value to be authorized | |
$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 |
/** * @dataProvider mockProvider * @param Order $obj */ public function testAuthorize($obj, $mockApiContext) { $mockPPRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock(); $mockPPRestCall->expects($this->any())->method('execute')->will($this->returnValue(AuthorizationTest::getJson())); $authorization = new Authorization(); $result = $obj->authorize($authorization, $mockApiContext, $mockPPRestCall); $this->assertNotNull($result); }