Skip to content

Commit

Permalink
fixed stripe -> checkout com
Browse files Browse the repository at this point in the history
  • Loading branch information
beinbm committed Aug 5, 2015
1 parent e63d58b commit 6d56e45
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 66 deletions.
19 changes: 3 additions & 16 deletions src/Message/AbstractRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,12 @@
*
* This is the parent class for all CheckoutCom requests.
*
* Test modes:
*
* CheckoutCom accounts have test-mode API keys as well as live-mode
* API keys. These keys can be active at the same time. Data
* created with test-mode credentials will never hit the credit
* card networks and will never cost anyone money.
*
* Unlike some gateways, there is no test mode endpoint separate
* to the live mode endpoint, the CheckoutCom API endpoint is the same
* for test and for live.
*
* Setting the testMode flag on this gateway has no effect. To
* use test mode just use your test mode API key.
*
* You can use any of the cards listed at https://stripe.com/docs/testing
* You can use any of the cards listed at
* https://www.checkout.com/docs/api/integration-guide/charges/simulator
* for testing.
*
* @see \Omnipay\CheckoutCom\Gateway
* @link https://stripe.com/docs/api
* @link https://www.checkout.com/docs/sandbox/api
* @method \Omnipay\CheckoutCom\Message\Response send()
*/
abstract class AbstractRequest extends \Omnipay\Common\Message\AbstractRequest
Expand Down
47 changes: 1 addition & 46 deletions src/Message/AuthorizeRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,52 +13,7 @@
* is transferred. The transaction will need to be captured later
* in order to effect payment. Uncaptured charges expire in 7 days.
*
* Example:
*
* <code>
* // Create a gateway for the CheckoutCom Gateway
* // (routes to GatewayFactory::create)
* $gateway = Omnipay::create('CheckoutCom');
*
* // Initialise the gateway
* $gateway->initialize(array(
* 'apiKey' => 'MyApiKey',
* ));
*
* // Create a credit card object
* // This card can be used for testing.
* $card = new CreditCard(array(
* 'firstName' => 'Example',
* 'lastName' => 'Customer',
* 'number' => '4242424242424242',
* 'expiryMonth' => '01',
* 'expiryYear' => '2020',
* 'cvv' => '123',
* 'email' => '[email protected]',
* 'billingAddress1' => '1 Scrubby Creek Road',
* 'billingCountry' => 'AU',
* 'billingCity' => 'Scrubby Creek',
* 'billingPostcode' => '4999',
* 'billingState' => 'QLD',
* ));
*
* // Do an authorize transaction on the gateway
* $transaction = $gateway->authorize(array(
* 'amount' => '10.00',
* 'currency' => 'USD',
* 'description' => 'This is a test authorize transaction.',
* 'card' => $card,
* ));
* $response = $transaction->send();
* if ($response->isSuccessful()) {
* echo "Authorize transaction was successful!\n";
* $sale_id = $response->getTransactionReference();
* echo "Transaction reference = " . $sale_id . "\n";
* }
* </code>
*
* @see \Omnipay\CheckoutCom\Gateway
* @link https://stripe.com/docs/api#charges
* @link https://www.checkout.com/docs/api/API-reference/payment-tokens/create-payment-token
*/
class AuthorizeRequest extends AbstractRequest
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Message/AbstractRequestTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Omnipay\Stripe\Message;
namespace Omnipay\CheckoutCom\Message;

use Mockery as m;
use Omnipay\Tests\TestCase;
Expand All @@ -9,7 +9,7 @@ class AbstractRequestTest extends TestCase
{
public function setUp()
{
$this->request = m::mock('\Omnipay\Stripe\Message\AbstractRequest')->makePartial();
$this->request = m::mock('\Omnipay\CheckoutCom\Message\AbstractRequest')->makePartial();
$this->request->initialize();
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Message/AuthorizeRequestTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Omnipay\Stripe\Message;
namespace Omnipay\CheckoutCom\Message;

use Omnipay\Tests\TestCase;

Expand Down
2 changes: 1 addition & 1 deletion tests/Message/ResponseTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Omnipay\Stripe\Message;
namespace Omnipay\CheckoutCom\Message;

use Omnipay\Tests\TestCase;

Expand Down

0 comments on commit 6d56e45

Please sign in to comment.