Example #1
0
 /**
  * @return TokenRequest
  */
 private function createTokenRequest()
 {
     $request = new TokenRequest();
     $request->setCardNumber('4444333322221111')->setExpirationMonth(12)->setExpirationYear(19)->setHolderName('Taro Spike')->setSecurityCode(123)->setCurrency('JPY')->setEmail('*****@*****.**');
     return $request;
 }
Example #2
0
 /**
  * @test
  *
  * @expectedException        \InvalidArgumentException
  * @expectedExceptionMessage The card number must be numerical.
  */
 public function setCardNumber_should_throw_an_InvalidArgumentException_if_non_numerical_string()
 {
     $request = new TokenRequest();
     $request->setCardNumber('0xFF');
 }