Retrieves the Webhooks event resource identified by event_id. Can be used to retrieve the payload for an event.
public static get ( string $eventId, |
||
$eventId | string | |
$apiContext | is the APIContext for this call. It can be used to pass dynamic configuration and credentials. | |
$restCall | is the Rest Call Service that is used to make rest calls | |
리턴 |
/** * @dataProvider mockProvider * @param WebhookEvent $obj */ public function testGet($obj, $mockApiContext) { $mockPayPalRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock(); $mockPayPalRestCall->expects($this->any())->method('execute')->will($this->returnValue(WebhookEventTest::getJson())); $result = $obj->get("eventId", $mockApiContext, $mockPayPalRestCall); $this->assertNotNull($result); }