Examples of BigDecimalFormatter


Examples of br.com.caelum.stella.gateway.core.BigDecimalFormatter

    this.request = request;
  }

  public BBFormularioInformaReturn handle() {
    // TODO Auto-generated method stub
    BigDecimal valor = new BigDecimalFormatter()
        .stringInCentsToBigDecimal(request.getParameter("valor"));
    return new BBFormularioInformaReturn(new BBBasicDataReturn(Integer.valueOf(request
        .getParameter("idConv")), request.getParameter("refTran")),
        valor);
  }
View Full Code Here

Examples of br.com.caelum.stella.gateway.core.BigDecimalFormatter

  public BigDecimal getValorTotalItens(){
    BigDecimal total = BigDecimal.ZERO;
    for(PagSeguroItem item : itens){
      total = total.add(item.getValor());
    }   
    return new BigDecimalFormatter().normalizaBigDecimal(total);
  }
View Full Code Here

Examples of br.com.caelum.stella.gateway.core.BigDecimalFormatter

  public BigDecimal getValorTotalFrete(){
    BigDecimal total = BigDecimal.ZERO;
    for(PagSeguroItem item : itens){
      total = total.add(item.getFrete());
    }     
    return new BigDecimalFormatter().normalizaBigDecimal(total);
   
  }
View Full Code Here

Examples of br.com.caelum.stella.gateway.core.BigDecimalFormatter

  /**
   *
   * @return
   */
  public String getValorFormatado() {
    return new BigDecimalFormatter().bigDecimalToStringInCents(checkout.getValor());
  }
View Full Code Here

Examples of br.com.caelum.stella.gateway.core.BigDecimalFormatter

  /**
   *
   * @return o valor em centavos.
   */
  public String getValorFormatado(){
    return new BigDecimalFormatter().bigDecimalToStringInCents(valor);
  }
View Full Code Here

Examples of br.com.caelum.stella.gateway.core.BigDecimalFormatter

  /**
   *
   * @return o frete em centavos
   */
  public String getValorFreteFormatado(){
    return new BigDecimalFormatter().bigDecimalToStringInCents(frete);
  }
View Full Code Here

Examples of br.com.caelum.stella.gateway.core.BigDecimalFormatter

    // TODO Auto-generated method stub
    PostMethod postMethod = new PostMethod(new GatewaysConf()
        .getBBUrlSonda());
    postMethod.addParameter("refTran", dadosRetornoPadrao.getRefTran());
    postMethod.addParameter("idConv", String.valueOf(dadosRetornoPadrao.getIdConv()));
    postMethod.addParameter("valorSonda", new BigDecimalFormatter()
        .bigDecimalToStringInCents(valorSonda));
    postMethod.addParameter("formato", formularioSondaReturnBuilder
        .getCodigo());
    String retorno = new HttpIntegrationRequester(postMethod).makeRequest();
    return formularioSondaReturnBuilder.buildReturn(retorno);
View Full Code Here

Examples of br.com.caelum.stella.gateway.core.BigDecimalFormatter

    this.formaPagamento = formaPagamento;
   
  }

  private BigDecimal calculaPrecoDividoPorCem(String unformattedPrice) {
    return new BigDecimalFormatter()
        .stringInCentsToBigDecimal(unformattedPrice);
  }
View Full Code Here

Examples of br.com.caelum.stella.gateway.core.BigDecimalFormatter

  /**
   *
   * @return preço formatado em centavos.
   */
  public String getValorFormatado() {
    return new BigDecimalFormatter().bigDecimalToStringInCents(this.price);
  }
View Full Code Here

Examples of br.com.caelum.stella.gateway.core.BigDecimalFormatter

    AmexDadosConfiguracao amexDadosConfiguracao = new AmexDadosConfiguracao(
        null, request.getParameter("vpc_Merchant"), null, request
            .getParameter("vpc_Command"), null,null);
    AmexCheckout checkout = new AmexCheckout(request
        .getParameter("vpc_MerchTxnRef"), request
        .getParameter("vpc_OrderInfo"), new BigDecimalFormatter()
        .stringInCentsToBigDecimal(request.getParameter("vpc_Amount")),
        null, new AmexFormaPagamento(new EnumComCodigoFinder()
            .descobreAEnumPeloCodigo(AmexTipoCartao.class, request
                .getParameter("vpc_Card"))));
    if (!"0".equals(codigoRetorno)) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.