Examples of Payment


Examples of br.com.caelum.example.model.Payment

    assertNotNull(basket.getId());
    assertEquals(basket.getItems().size(), selectedItems.size());
    System.out.println(basket.getItems());

    assertTrue(resource(basket).hasLink("payment"));
    response = resource(basket).getLink("payment").follow().as(XML).accept(XML).post(new Payment(basket.getCost()));
    Payment payment = response.getResource();

    assertEquals(Status.ACCEPTED, payment.getStatus());

    System.out.println(payment.getStatus());

  }
View Full Code Here

Examples of br.com.caelum.restbucks.model.Payment

        order = resources.entryAt(uri).post(order);
       
        System.out.println(String.format("Order placed at [%s]", order.getSelfUri()));
       
        // Pay for the order
        Payment payment = new Payment("12345677878", "guilherme silveira", 12, 2999, order.getCost());
        System.out.println(String.format("About to create a payment resource at [%s] via PUT", resource(order).getRelation("payment").getHref()));
        payment =  order.pay(payment);
        System.out.println("Payment made, receipt created at: " + payment.getCreatedAt());

        // Check on the order status
        System.out.println(String.format("About to check order status at [%s] via GET", order.getSelfUri()));
        order = (Order) resource(order).getRelation("self").accessAndRetrieve();
        System.out.println(String.format("Final order placed, current status [%s]", order.getStatus()));
View Full Code Here

Examples of com.dyuproject.protostuff.runtime.MathObjectsTest.Payment

   
    public void testPayment() throws Exception
    {
        MappedSchema<Payment> schema = getSchema(Payment.class);
       
        Payment payment = MathObjectsTest.filledPayment();
       
        roundTrip(payment, schema, schema.getPipeSchema());
    }
View Full Code Here

Examples of com.expositds.ars.domain.billing.Payment

  }

  @SuppressWarnings("deprecation")
  @Override
  public Payment convertFrom(PaymentEntity source, Payment destination) {
    Payment result = null;
    PaymentEntity tmp = null;

    if (source != null) {
      tmp = HibernateHelper.initializeAndUnproxy(source);
    }
View Full Code Here

Examples of com.oltpbenchmark.benchmarks.tpcc.procedures.Payment

        if (nextTransaction.getProcedureClass().equals(NewOrder.class)) {
          NewOrder proc = (NewOrder) this.getProcedure(NewOrder.class);
      proc.run(conn, gen, terminalWarehouseID, numWarehouses,
          terminalDistrictLowerID, terminalDistrictUpperID, this);
        } else if (nextTransaction.getProcedureClass().equals(Payment.class)) {
      Payment proc2 = (Payment) this.getProcedure(Payment.class);
      proc2.run(conn, gen, terminalWarehouseID, numWarehouses,
          terminalDistrictLowerID, terminalDistrictUpperID, this);
        } else if (nextTransaction.getProcedureClass().equals(StockLevel.class)) {
          StockLevel proc3 = (StockLevel) this.getProcedure(StockLevel.class);
          proc3.run(conn, gen, terminalWarehouseID, numWarehouses,
              terminalDistrictLowerID, terminalDistrictUpperID, this);
View Full Code Here

Examples of com.openbravo.ws.externalsales.Payment

            //Saco las lineas de pago
            Payment[] paymentLine = new Payment[ticket.getPayments().size()];
            for (int j = 0; j < ticket.getPayments().size(); j++){      
                PaymentInfo payment = ticket.getPayments().get(j);

                paymentLine[j] = new Payment();
                paymentLine[j].setAmount(payment.getTotal());
                if ("magcard".equals(payment.getName())) {
                    paymentLine[j].setPaymentType("K");
                } else if ("cheque".equals(payment.getName())) {
                    paymentLine[j].setPaymentType("2");
View Full Code Here

Examples of com.openbravo.ws.externalsales.Payment

    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof Payment)) {
            return false;
        }
        Payment other = (Payment) obj;
        if (obj == null) {
            return false;
        }
        if (this == obj) {
            return true;
        }
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true &&
                this.amount == other.getAmount() &&
                ((this.paymentType == null && other.getPaymentType() == null) ||
                (this.paymentType != null &&
                this.paymentType.equals(other.getPaymentType())));
        __equalsCalc = null;
        return _equals;
    }
View Full Code Here

Examples of com.opengamma.analytics.financial.interestrate.payments.derivative.Payment

    ArgumentChecker.notNull(curves, "curves");

    double sum = 0;

    final int n = annuity.getNumberOfPayments();
    Payment payment;
    for (int i = 0; i < n; i++) {
      payment = annuity.getNthPayment(i);
      final double temp = payment.accept(PRESENT_VALUE_CALCULATOR, curves);
      sum += temp * Math.exp(-zSpread * payment.getPaymentTime());
    }
    return sum;
  }
View Full Code Here

Examples of com.suarte.core.Payment

        if (myType.equals("receipt")) {
            response.setContentType("application/pdf");

            id = Long.valueOf(request.getParameter("id"));
            Payment payment = paymentManager.get(id);

            ReceiptFormatToPdf pdf = new ReceiptFormatToPdf();
            pdf.write(payment, response.getOutputStream());

            response.getOutputStream().close();
View Full Code Here

Examples of com.tuscanyscatours.payment.Payment

    }

    @Test
    public void testPayment() {
        SCAClient client = (SCAClient)paymentNode;
        Payment payment = client.getService(Payment.class, "PaymentClient");
        String result = payment.makePaymentMember("Fred", 100.00f);
        System.out.println("Result = " + result);
        if (!"Success".equals(result)) {
            throw new RuntimeException(result);
        }
    }
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.