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

Refund a captured payment by passing the capture_id in the request URI. In addition, include an amount object in the body of the request JSON.
Устаревший: Please use #refundCapturedPayment instead.
public refund ( Refund $refund, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Refund
$refund Refund
$apiContext PayPal\Rest\ApiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall PayPal\Transport\PayPalRestCall is the Rest Call Service that is used to make rest calls
Результат Refund
Пример #1
0
 /**
  * @dataProvider mockProvider
  * @param Capture $obj
  */
 public function testRefund($obj, $mockApiContext)
 {
     $mockPPRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock();
     $mockPPRestCall->expects($this->any())->method('execute')->will($this->returnValue(RefundTest::getJson()));
     $refund = RefundTest::getObject();
     $result = $obj->refund($refund, $mockApiContext, $mockPPRestCall);
     $this->assertNotNull($result);
 }