Paypal: Redirects


use Payum\Core\Model\Payment;
use Payum\Core\GatewayInterface;
use Payum\Core\Request\Capture;

$model = new Payment();
    'RETURNURL' => 'http://return.url',
    'CANCELURL' => 'http://cancel.url',

/** @var GatewayInterface $gateway */
$gateway->execute(new Capture($model));

// or using raw format
$model = array(
   'RETURNURL' => 'http://return.url',
   'CANCELURL' => 'http://cancel.url',

$gateway->execute(new Capture($model);

Back to examples

Supporting Payum

Payum is an MIT-licensed open source project with its ongoing development made possible entirely by the support of community and our customers. If you'd like to join them, please consider:

Last updated