src/Factory/ChargeRequest.php
public function setCardExpMonth($sCardExpMonth)
    {
        //  Validate
        if (is_numeric($sCardExpMonth)) {

            $iMonth = (int) $sCardExpMonth;
            if ($iMonth < 1 || $iMonth > 12) {

                throw new ChargeRequestException(
                    '"' . $sCardExpMonth . '" is an invalid expiry month; must be in the range 1-12.',
                    1
                );

            } else {
                $this->oCard->exp->month = $iMonth < 10 ? '0' . $iMonth : (string) $iMonth;
                return $this;
            }

        } else {
            throw new ChargeRequestException(
                '"' . $sCardExpMonth . '" is an invalid expiry month; must be numeric.',
                1
            );
        }
    }
public function setCardExpMonth($sCardExpMonth)
    {
        //  Validate
        if (is_numeric($sCardExpMonth)) {

            $iMonth = (int) $sCardExpMonth;
            if ($iMonth < 1 || $iMonth > 12) {

                throw new ChargeRequestException(
                    '"' . $sCardExpMonth . '" is an invalid expiry month; must be in the range 1-12.',
                    1
                );

            } else {
                $this->oCard->exp->month = $iMonth < 10 ? '0' . $iMonth : (string) $iMonth;
                return $this;
            }

        } else {
            throw new ChargeRequestException(
                '"' . $sCardExpMonth . '" is an invalid expiry month; must be numeric.',
                1
            );
        }
    }
public function setCardExpMonth ( $ sCardExpMonth ) { //  Validate if ( is_numeric ( $ sCardExpMonth ) ) { $ iMonth = ( int ) $ sCardExpMonth ; if ( $ iMonth < 1 || $ iMonth > 12 ) { throw new ChargeRequestException ( '"' . $ sCardExpMonth . '" is an invalid expiry month; must be in the range 1-12.' , 1 ) ; } else { $ this -> oCard -> exp -> month = $ iMonth < 10 ? '0' . $ iMonth : ( string ) $ iMonth ; return $ this ; } } else { throw new ChargeRequestException ( '"' . $ sCardExpMonth . '" is an invalid expiry month; must be numeric.' , 1 ) ; } }
Set the card's expiry month

@param string $sCardExpMonth The card's expiry month

@throws ChargeRequestException
@return $this
Set the card s expiry month