示例#1
0
 /**
  * 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']);
 }
示例#2
0
<?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)));