Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,21 @@
}
},
"require": {
"vimeo/payment-gateway-logger": "^1.0",
"omnipay/common": "~2.0",
"php": "^7.1|^8.0",
"composer/ca-bundle": "^1.1",
"ext-soap": "*"
"ext-soap": "*",
"omnipay/common": "^3.0",
"php-http/guzzle7-adapter": "^1.0.0",
"symfony/event-dispatcher": ">=2.1",
"vimeo/payment-gateway-logger": "dev-update-dependencies"
},
"require-dev": {
"omnipay/tests": "~2.0"
"http-interop/http-factory-guzzle": "^1.1",
"omnipay/tests": "^4.0"
},
"config": {
"allow-plugins": {
"php-http/discovery": true
}
}
}
2 changes: 1 addition & 1 deletion src/Message/AbstractHOARequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use ReflectionClass;
use ReflectionMethod;
use Omnipay\Vindicia\NameValue;
use Guzzle\Http\ClientInterface;
use Omnipay\Common\Http\ClientInterface;
use Symfony\Component\HttpFoundation\Request as HttpRequest;
use Omnipay\Vindicia\AttributeBag;

Expand Down
7 changes: 4 additions & 3 deletions src/Message/AbstractRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
use PaymentGatewayLogger\Event\ResponseEvent;
use SoapFault;
use stdClass;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\Request as HttpRequest;
use Guzzle\Http\ClientInterface;
use Omnipay\Common\Http\ClientInterface;
use InvalidArgumentException;
use Omnipay\Common\CreditCard;
use Omnipay\Vindicia\NonStrippingCreditCard;
Expand Down Expand Up @@ -142,7 +143,7 @@ public function __construct(ClientInterface $httpClient, HttpRequest $httpReques
$this->isUpdate = $isUpdate;

// Used to fire events before and after executing a request.
$this->eventDispatcher = $httpClient->getEventDispatcher();
$this->eventDispatcher = new EventDispatcher();
}

/**
Expand Down Expand Up @@ -1331,7 +1332,7 @@ abstract public function getData();
* @return bool
* @psalm-variadic
*/
public function validate()
public function validate(...$args)
{
return call_user_func_array('parent::validate', func_get_args());
}
Expand Down
2 changes: 1 addition & 1 deletion tests/ApplePayGatewayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ApplePayGatewayTest extends GatewayTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
$this->gateway = new ApplePayGateway($this->getHttpClient(), $this->getHttpRequest());
$this->gateway->setTestMode(true);
Expand Down
2 changes: 1 addition & 1 deletion tests/AttributeBagTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class AttributeBagTest extends TestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
$this->bag = new AttributeBag();
$this->faker = new DataFaker();
Expand Down
2 changes: 1 addition & 1 deletion tests/AttributeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class AttributeTest extends TestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
$this->attribute = new Attribute();
$this->faker = new DataFaker();
Expand Down
2 changes: 1 addition & 1 deletion tests/ChargebackTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ChargebackTest extends TestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
$this->faker = new DataFaker();
$this->chargeback = new Chargeback();
Expand Down
2 changes: 1 addition & 1 deletion tests/CustomerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class CustomerTest extends TestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
$this->faker = new DataFaker();
$this->customer = new Customer();
Expand Down
8 changes: 4 additions & 4 deletions tests/EventEmitterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace Omnipay\Vindicia;

use Exception;
use Guzzle\Http\Client;
use Guzzle\Http\ClientInterface;
use Omnipay\Common\Http\Client;
use Omnipay\Common\Http\ClientInterface;
use Omnipay\Vindicia\TestFramework\DataFaker;
use Omnipay\Vindicia\TestFramework\SoapTestCase;
use Omnipay\Vindicia\TestFramework\TestSubscriber;
Expand All @@ -30,7 +30,7 @@ class EventEmitterTest extends SoapTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
date_default_timezone_set('Europe/London');

Expand All @@ -45,7 +45,7 @@ public function setUp()
$this->transactionReference = $this->faker->transactionReference();
$this->riskScore = $this->faker->riskScore();

$this->customHttpClient = new Client('', array('redirect.disable' => true));
$this->customHttpClient = new Client();
$this->eventDispatcher = $this->customHttpClient->getEventDispatcher();

$this->testSubscriber = new TestSubscriber($this->faker->name(), new TestLogger());
Expand Down
2 changes: 1 addition & 1 deletion tests/GatewayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class GatewayTest extends GatewayTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
date_default_timezone_set('Europe/London');
$this->gateway = new Gateway($this->getHttpClient(), $this->getHttpRequest());
Expand Down
2 changes: 1 addition & 1 deletion tests/HOAGatewayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class HOAGatewayTest extends GatewayTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
$this->gateway = new HOAGateway($this->getHttpClient(), $this->getHttpRequest());
$this->gateway->setTestMode(true);
Expand Down
2 changes: 1 addition & 1 deletion tests/Message/AbstractHOARequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class AbstractHOARequestTest extends SoapTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
$this->request = Mocker::mockHOARequest('\Omnipay\Vindicia\Message\AbstractHOARequest')->shouldAllowMockingProtectedMethods();
$this->request->initialize();
Expand Down
2 changes: 1 addition & 1 deletion tests/Message/AbstractRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class AbstractRequestTest extends SoapTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
date_default_timezone_set('Europe/London');
$this->request = Mocker::mock('\Omnipay\Vindicia\Message\AbstractRequest')->makePartial()->shouldAllowMockingProtectedMethods();
Expand Down
2 changes: 1 addition & 1 deletion tests/Message/ApplePayAuthorizeRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ApplePayAuthorizeRequestTest extends TestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
// Gateway parameters.
$this->faker = new DataFaker();
Expand Down
2 changes: 1 addition & 1 deletion tests/Message/ApplePayCompleteAuthorizeRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ApplePayCompleteAuthorizeRequestTest extends TestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
// Gateway parameters.
$this->faker = new DataFaker();
Expand Down
2 changes: 1 addition & 1 deletion tests/Message/AuthorizeRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class AuthorizeRequestTest extends SoapTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
date_default_timezone_set('Europe/London');
$this->faker = new DataFaker();
Expand Down
2 changes: 1 addition & 1 deletion tests/Message/CalculateSalesTaxRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CalculateSalesTaxRequestTest extends SoapTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
$this->faker = new DataFaker();

Expand Down
2 changes: 1 addition & 1 deletion tests/Message/CancelSubscriptionRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class CancelSubscriptionRequestTest extends SoapTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
date_default_timezone_set('Europe/London');
$this->faker = new DataFaker();
Expand Down
2 changes: 1 addition & 1 deletion tests/Message/CancelSubscriptionsRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class CancelSubscriptionsRequestTest extends SoapTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
$this->faker = new DataFaker();

Expand Down
2 changes: 1 addition & 1 deletion tests/Message/CaptureRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class CaptureRequestTest extends SoapTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
$this->faker = new DataFaker();
$this->transactionId = $this->faker->transactionId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class CompleteCreatePayPalSubscriptionRequestTest extends SoapTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
$this->faker = new DataFaker();

Expand Down
2 changes: 1 addition & 1 deletion tests/Message/CompleteHOARequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CompleteHOARequestTest extends SoapTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
date_default_timezone_set('Europe/London');
$this->faker = new DataFaker();
Expand Down
2 changes: 1 addition & 1 deletion tests/Message/CompletePayPalPurchaseRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class CompletePayPalPurchaseRequestTest extends SoapTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
$this->faker = new DataFaker();

Expand Down
2 changes: 1 addition & 1 deletion tests/Message/CreateCustomerRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class CreateCustomerRequestTest extends SoapTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
date_default_timezone_set('Europe/London');
$this->faker = new DataFaker();
Expand Down
2 changes: 1 addition & 1 deletion tests/Message/CreatePayPalSubscriptionRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class CreatePayPalSubscriptionRequestTest extends SoapTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
$this->faker = new DataFaker();

Expand Down
2 changes: 1 addition & 1 deletion tests/Message/CreatePaymentMethodRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class CreatePaymentMethodRequestTest extends SoapTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
$this->faker = new DataFaker();

Expand Down
2 changes: 1 addition & 1 deletion tests/Message/CreatePlanRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CreatePlanRequestTest extends SoapTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
$this->faker = new DataFaker();

Expand Down
2 changes: 1 addition & 1 deletion tests/Message/CreateProductRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CreateProductRequestTest extends SoapTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
$this->faker = new DataFaker();

Expand Down
2 changes: 1 addition & 1 deletion tests/Message/CreateSubscriptionRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CreateSubscriptionRequestTest extends SoapTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
date_default_timezone_set('Europe/London');
$this->faker = new DataFaker();
Expand Down
2 changes: 1 addition & 1 deletion tests/Message/FetchChargebacksRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class FetchChargebacksRequestTest extends SoapTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
$this->faker = new DataFaker();

Expand Down
2 changes: 1 addition & 1 deletion tests/Message/FetchCustomerRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class FetchCustomerRequestTest extends SoapTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
$this->faker = new DataFaker();

Expand Down
2 changes: 1 addition & 1 deletion tests/Message/FetchPaymentMethodRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class FetchPaymentMethodRequestTest extends SoapTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
date_default_timezone_set('Europe/London');
$this->faker = new DataFaker();
Expand Down
2 changes: 1 addition & 1 deletion tests/Message/FetchPaymentMethodsRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class FetchPaymentMethodsRequestTest extends SoapTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
$this->faker = new DataFaker();

Expand Down
2 changes: 1 addition & 1 deletion tests/Message/FetchPlanRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class FetchPlanRequestTest extends SoapTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
$this->faker = new DataFaker();

Expand Down
2 changes: 1 addition & 1 deletion tests/Message/FetchProductRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class FetchProductRequestTest extends SoapTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
$this->faker = new DataFaker();

Expand Down
2 changes: 1 addition & 1 deletion tests/Message/FetchRefundsRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class FetchRefundsRequestTest extends SoapTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
$this->faker = new DataFaker();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class FetchSubscriptionInvoiceReferencesRequestTest extends SoapTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
$this->faker = new DataFaker();

Expand Down
2 changes: 1 addition & 1 deletion tests/Message/FetchSubscriptionInvoiceRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class FetchSubscriptionInvoiceRequestTest extends SoapTestCase
/**
* @return void
*/
public function setUp()
public function setUp(): void
{
$this->faker = new DataFaker();

Expand Down
Loading