All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 32s
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 1s
82 lines
1.8 KiB
PHP
82 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace Omnipay\PayPal;
|
|
|
|
use Omnipay\Common\AbstractGateway;
|
|
|
|
/**
|
|
* PayPal Pro Class
|
|
*/
|
|
class ProGateway extends AbstractGateway
|
|
{
|
|
public function getName()
|
|
{
|
|
return 'PayPal Pro';
|
|
}
|
|
|
|
public function getDefaultParameters()
|
|
{
|
|
return array(
|
|
'username' => '',
|
|
'password' => '',
|
|
'signature' => '',
|
|
'testMode' => false,
|
|
);
|
|
}
|
|
|
|
public function getUsername()
|
|
{
|
|
return $this->getParameter('username');
|
|
}
|
|
|
|
public function setUsername($value)
|
|
{
|
|
return $this->setParameter('username', $value);
|
|
}
|
|
|
|
public function getPassword()
|
|
{
|
|
return $this->getParameter('password');
|
|
}
|
|
|
|
public function setPassword($value)
|
|
{
|
|
return $this->setParameter('password', $value);
|
|
}
|
|
|
|
public function getSignature()
|
|
{
|
|
return $this->getParameter('signature');
|
|
}
|
|
|
|
public function setSignature($value)
|
|
{
|
|
return $this->setParameter('signature', $value);
|
|
}
|
|
|
|
public function authorize(array $parameters = array())
|
|
{
|
|
return $this->createRequest('\Omnipay\PayPal\Message\ProAuthorizeRequest', $parameters);
|
|
}
|
|
|
|
public function purchase(array $parameters = array())
|
|
{
|
|
return $this->createRequest('\Omnipay\PayPal\Message\ProPurchaseRequest', $parameters);
|
|
}
|
|
|
|
public function capture(array $parameters = array())
|
|
{
|
|
return $this->createRequest('\Omnipay\PayPal\Message\CaptureRequest', $parameters);
|
|
}
|
|
|
|
public function refund(array $parameters = array())
|
|
{
|
|
return $this->createRequest('\Omnipay\PayPal\Message\RefundRequest', $parameters);
|
|
}
|
|
|
|
public function fetchTransaction(array $parameters = array())
|
|
{
|
|
return $this->createRequest('\Omnipay\PayPal\Message\FetchTransactionRequest', $parameters);
|
|
}
|
|
}
|