/** * Assert that a token is successfully created with the given parameters set. * */ public function testCreate() { $token = OmiseToken::create(array('card' => array('name' => 'Somchai Prasert', 'number' => '4242424242424242', 'expiration_month' => 10, 'expiration_year' => 2018, 'city' => 'Bangkok', 'postal_code' => '10320', 'security_code' => 123))); $this->assertArrayHasKey('object', $token); $this->assertEquals('token', $token['object']); }
<?php $token = OmiseToken::create(array('card' => array('name' => 'Somchai Prasert', 'number' => '4242424242424242', 'expiration_month' => 10, 'expiration_year' => 2018, 'city' => 'Bangkok', 'postal_code' => '10320', 'security_code' => 123)));