Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
GatewayFactory
✓ use Omnipay\Common\GatewayFactory;
Create a PayPal Express gateway and initiate a purchase.
use Omnipay\Common\GatewayFactory;
$gateway = GatewayFactory::create('PayPal_Express');
$gateway->setUsername('your-username');
$gateway->setPassword('your-password');
$gateway->setSignature('your-signature');
$response = $gateway->purchase([
'amount' => '10.00',
'currency' => 'USD',
'returnUrl' => 'https://example.com/success',
'cancelUrl' => 'https://example.com/cancel'
])->send();
if ($response->isRedirect()) {
$response->redirect();
}
Debug
Known issues
No known issues recorded.
Audit
Dependencies
No dependency data recorded yet.