public function setUp()
 {
     $this->setUpHttpMock();
     self::$client = new Client("skey_123", "test");
     $this->http->mock->when()->methodIs("GET")->pathIs("/v1/promo_codes")->then()->body(fixture_response("promo_codes_list.json"))->statusCode(200)->end();
     $this->http->setUp();
 }
 public function setUp()
 {
     $this->setUpHttpMock();
     self::$client = new Client("skey_123", "test");
     self::$params = array("name" => "20OFF", "promo_type" => "amount", "value" => 2000);
     $this->http->mock->when()->methodIs("DELETE")->pathIs("/v1/promo_codes/20OFF")->then()->body(fixture_response("promo_code.json"))->statusCode(200)->end();
     $this->http->setUp();
 }
 public function setUp()
 {
     $this->setUpHttpMock();
     self::$client = new Client("skey_123", "test");
     self::$params = array();
     $this->http->mock->when()->methodIs("POST")->pathIs("/v1/refunds")->then()->body(fixture_response("invalid_amount.json"))->statusCode(400)->end();
     $this->http->setUp();
 }
 public function setUp()
 {
     $this->setUpHttpMock();
     self::$client = new Client("skey_123", "test");
     self::$params = array("amount" => 1000, "currency" => "usd", "name" => "Test Plan", "period_unit" => "month");
     $this->http->mock->when()->methodIs("POST")->pathIs("/v1/recurring/plans")->then()->body(fixture_response("invalid_name.json"))->statusCode(400)->end();
     $this->http->setUp();
 }
 public function setUp()
 {
     $this->setUpHttpMock();
     self::$client = new Client("skey_123", "test");
     self::$tokenId = "txn_b43a7e1e51410639979ab2047c156caa";
     $this->http->mock->when()->methodIs("GET")->pathIs("/v1/tokens/" . self::$tokenId)->then()->body(fixture_response("token.json"))->statusCode(200)->end();
     $this->http->setUp();
 }
 public function setUp()
 {
     $this->setUpHttpMock();
     self::$client = new Client("skey_123", "test");
     self::$planId = "pln_123";
     $this->http->mock->when()->methodIs("GET")->pathIs("/v1/recurring/plans/" . self::$planId)->then()->body(fixture_response("plan.json"))->statusCode(200)->end();
     $this->http->setUp();
 }
 public function setUp()
 {
     $this->setUpHttpMock();
     self::$client = new Client("skey_123", "test");
     self::$params = array("plan_token" => "pln_965d6898b660d85b");
     $this->http->mock->when()->methodIs("GET")->pathIs("/v1/recurring/subscriptions?plan.token=pln_965d6898b660d85b")->then()->body(fixture_response("subscriptions_list.json"))->statusCode(200)->end();
     $this->http->setUp();
 }
 public function setUp()
 {
     $this->setUpHttpMock();
     self::$client = new Client("skey_123", "test");
     self::$chargeId = "chg_123";
     $this->http->mock->when()->methodIs("GET")->pathIs("/v1/charges/" . self::$chargeId)->then()->body(fixture_response("invalid_charge_id.json"))->statusCode(400)->end();
     $this->http->setUp();
 }
 public function setUp()
 {
     $this->setUpHttpMock();
     self::$client = new Client("skey_123", "test");
     self::$params = array("amount" => 100, "charge_id" => "chg_123");
     $this->http->mock->when()->methodIs("POST")->pathIs("/v1/refunds")->then()->body(fixture_response("refund.json"))->statusCode(201)->end();
     $this->http->setUp();
 }
 public function setUp()
 {
     $this->setUpHttpMock();
     self::$client = new Client("skey_123", "test");
     self::$subscriptionId = "sub_123";
     $this->http->mock->when()->methodIs("POST")->pathIs("/v1/subscriptions/" . self::$subscriptionId . "/cancel")->then()->body(fixture_response("subscription.json"))->statusCode(200)->end();
     $this->http->setUp();
 }
 public function setUp()
 {
     $this->setUpHttpMock();
     self::$client = new Client("skey_123", "test");
     self::$params = array("amount" => 100, "description" => "Test Description");
     $this->http->mock->when()->methodIs("POST")->pathIs("/v1/tokens")->then()->body(fixture_response("token.json"))->statusCode(201)->end();
     $this->http->setUp();
 }