public static function charge(array $options = array())
    {
        $api = new Api\Charge();

        if (isset($options['pincode'])) {
            $api->setPincode($options['pincode']);
        }
        if (isset($options['cardNumber'])) {
            $api->setCardNumber($options['cardNumber']);
        }
        if (isset($options['amount'])) {
            $api->setAmount(round($options['amount'] * 100));
        }
        $result = $api->doRequest();

        return $result['request']['result'] == 1;
    }
public static function charge(array $options = array())
    {
        $api = new Api\Charge();

        if (isset($options['pincode'])) {
            $api->setPincode($options['pincode']);
        }
        if (isset($options['cardNumber'])) {
            $api->setCardNumber($options['cardNumber']);
        }
        if (isset($options['amount'])) {
            $api->setAmount(round($options['amount'] * 100));
        }
        $result = $api->doRequest();

        return $result['request']['result'] == 1;
    }
public static function charge ( array $ options = array ( ) ) { $ api = new Api \ Charge ( ) ; if ( isset ( $ options [ 'pincode' ] ) ) { $ api -> setPincode ( $ options [ 'pincode' ] ) ; } if ( isset ( $ options [ 'cardNumber' ] ) ) { $ api -> setCardNumber ( $ options [ 'cardNumber' ] ) ; } if ( isset ( $ options [ 'amount' ] ) ) { $ api -> setAmount ( round ( $ options [ 'amount' ] * 100 ) ) ; } $ result = $ api -> doRequest ( ) ; return $ result [ 'request' ] [ 'result' ] == 1 ; }
Charge a voucher
@param array $options
@return bool if the charge was done succefully
Charge a voucher