public function setNumber($value) { // strip non-numeric characters return $this->setParameter('number', preg_replace('/\\D/', '', $value)); }
public function testCreateCardLocallyValidatesCardsDuringNonTestMode() { $this->card->setNumber('1'); $this->gateway->setTestMode(false); $this->setMockHttpResponse('CreateCardSuccess.txt'); $transaction = $this->gateway->createCard(array('card' => $this->card)); $this->setExpectedException('\\Omnipay\\Common\\Exception\\InvalidCreditCardException'); $transaction->send(); }