Payum\Paypal\Ipn\Api::getIpnEndpoint PHP Method

getIpnEndpoint() public method

public getIpnEndpoint ( ) : string
return string
    public function getIpnEndpoint()
    {
        return $this->options['sandbox'] ? 'https://www.sandbox.paypal.com/cgi-bin/webscr' : 'https://www.paypal.com/cgi-bin/webscr';
    }

Usage Example

Beispiel #1
0
 /**
  * @test
  */
 public function shouldProxyWholeNotificationToClientSend()
 {
     $actualRequest = null;
     $clientMock = $this->createClientMock();
     $clientMock->expects($this->once())->method('send')->with($this->isInstanceOf('Buzz\\Message\\Form\\FormRequest'), $this->isInstanceOf('Buzz\\Message\\Response'))->will($this->returnCallback(function ($request, $response) use(&$actualRequest) {
         $response->setHeaders(array('HTTP/1.1 200 OK'));
         $response->setContent('ACK=Success');
         $actualRequest = $request;
     }));
     $api = new Api($clientMock, array('sandbox' => false));
     $expectedNotification = array('foo' => 'foo', 'bar' => 'baz');
     $api->notifyValidate($expectedNotification);
     $this->assertInstanceOf('Buzz\\Message\\Form\\FormRequest', $actualRequest);
     $this->assertEquals(array('cmd' => Api::CMD_NOTIFY_VALIDATE) + $expectedNotification, $actualRequest->getFields());
     $this->assertEquals($api->getIpnEndpoint(), $actualRequest->getUrl());
     $this->assertEquals('POST', $actualRequest->getMethod());
 }
All Usage Examples Of Payum\Paypal\Ipn\Api::getIpnEndpoint