Skip to content

Commit

Permalink
Issue #31 Import exception
Browse files Browse the repository at this point in the history
  • Loading branch information
judgej committed Jul 25, 2018
1 parent eba0583 commit 7407f06
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -9,6 +9,7 @@ php:
# This triggers builds to run on the new TravisCI infrastructure.
# See: http://docs.travis-ci.com/user/workers/container-based-infrastructure/
sudo: false

## Cache composer
cache:
directories:
Expand Down
1 change: 1 addition & 0 deletions src/Traits/HasGatewayParams.php
Expand Up @@ -8,6 +8,7 @@
*/

use Omnipay\Payone\AbstractShopGateway;
use Omnipay\Common\Exception\InvalidRequestException;

trait HasGatewayParams
{
Expand Down
12 changes: 12 additions & 0 deletions tests/ShopServerGatewayTest.php
Expand Up @@ -3,6 +3,7 @@
namespace Omnipay\Payone;

use Omnipay\Tests\GatewayTestCase;
//use Omnipay\Common\Exception\InvalidRequestException;

class ShopServerGatewayTest extends GatewayTestCase
{
Expand Down Expand Up @@ -220,4 +221,15 @@ public function testPurchaseFailure()
$this->assertSame('Invalid card expiry date. Please verify your card data.', $response->getCustomerMessage());
$this->assertNull($response->getTransactionReference());
}

/**
* See https://github.com/academe/OmniPay-Payone/issues/31
* @expectedException Omnipay\Common\Exception\InvalidRequestException
*/
public function testInvalidMerchantId()
{
$this->gateway->initialize([
'merchantId' => 'abcdef',
]);
}
}

0 comments on commit 7407f06

Please sign in to comment.