コード例 #1
0
 function setUp()
 {
     White::setApiKey('sk_test_1234567890abcdefghijklmnopq');
 }
コード例 #2
0
 function setUp()
 {
     White::setApiKey('sk_test_1234567890abcdefghijklmnopq');
     // Data for a successful customer
     $this->success_data = array("description" => "Test Customer", "card" => array("number" => "4242424242424242", "exp_month" => 11, "exp_year" => 2015, "cvc" => "123"));
 }
コード例 #3
0
 function testApiKey()
 {
     $testKey = 'sk_test_1234567890abcdefghijklmnopq';
     White::setApiKey($testKey);
     $this->assertEquals($testKey, White::getApiKey());
 }
コード例 #4
0
 /**
  * @expectedException White_Error_Api
  */
 function testApiException()
 {
     White::setApiKey('sk_test_1234567890abcdefghijklmnopq');
     $data = array("amount" => 10.5, "currency" => "bhd", "card" => array("number" => "3566002020360505", "exp_month" => 12, "exp_year" => 2014, "cvc" => "123"), "description" => "Charge for test@example.com");
     White_Charge::create($data);
 }
コード例 #5
0
 public function set_api_key($key)
 {
     parent::setApiKey($key);
 }