PayPal\Test\Api\CaptureTest::getJson PHP Méthode

getJson() public static méthode

Gets Json String of Object Capture
public static getJson ( ) : string
Résultat string
    public static function getJson()
    {
        return '{"id":"TestSample","amount":' . AmountTest::getJson() . ',"is_final_capture":true,"state":"TestSample","reason_code":"TestSample","parent_payment":"TestSample","invoice_number":"TestSample","transaction_fee":' . CurrencyTest::getJson() . ',"create_time":"TestSample","update_time":"TestSample","links":' . LinksTest::getJson() . '}';
    }

Usage Example

 /**
  * @dataProvider mockProvider
  * @param Capture $obj
  */
 public function testGet($obj, $mockApiContext)
 {
     $mockPPRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock();
     $mockPPRestCall->expects($this->any())->method('execute')->will($this->returnValue(CaptureTest::getJson()));
     $result = $obj->get("captureId", $mockApiContext, $mockPPRestCall);
     $this->assertNotNull($result);
 }
All Usage Examples Of PayPal\Test\Api\CaptureTest::getJson