Package org.jayasoft.woj.portal.model

Examples of org.jayasoft.woj.portal.model.PaymentInfo


        LoggingManager.initSimpleLoggingManagement();
        InvoiceBuilder builder = ItextPDFInvoiceBuilder.instance();
        Order o = new Order();
        o.setTotalCost(50.0d);
        Invoice i = new Invoice();
        PaymentInfo pi = new PaymentInfo();
        License l = new License();
        Price p = new Price();
        p.setPriceByYear(50);
        l.setPrice(p);
        pi.setLicenses(Collections.singleton(l));
        o.setPayments(Collections.singleton(pi));
        o.setInvoice(i);
        Purchaser pur = getPurchaser();
        if (builder.buildInvoicePDF(o, pur, "inv-" + System.currentTimeMillis()) != null) {
            LOGGER.debug("pdf done");
View Full Code Here


  }
  public PaymentInfo newPaymentInfo(Order order, String transactionId, String authorisationId, String bankResponseCode) throws ServiceException {
        LOGGER.info(MessageFormat.format("saving payment transactionId[{0}] authId[{1}] bankCode[{2}] for order : {3}"
                        , new Object[] {transactionId, authorisationId, bankResponseCode, order})
        );
    PaymentInfo paymentInfo = (PaymentInfo) DaoFactory.getPaymentInfoDao().newHandledObject();
    paymentInfo.setOrder(order);
    paymentInfo.setTransactionId(transactionId);
    paymentInfo.setBankResponseCode(bankResponseCode);
    paymentInfo.setAuthorisationId(authorisationId);
    try {
      DaoFactory.getPaymentInfoDao().save(paymentInfo);
            LOGGER.info("payment registered");
      return paymentInfo;
    } catch (DaoException e) {
View Full Code Here

      Order pendingOrder = Portal.getInstance().getPricingService().getOrder(Long.valueOf(orderId));
      LOGGER.debug("pendingOrder ="+pendingOrder);
      //payment authorized
      if(pendingOrder != null) {
                LOGGER.info("order:" + pendingOrder.getId() + "found for this payment");
        PaymentInfo paymentInfo = Portal.getInstance().getPricingService().getPayment(pendingOrder);
        LOGGER.debug("paymentInfo ="+paymentInfo);
        //verify that payment is not yet registered
        if(paymentInfo == null) {
          //send email confirmation
          if(!pendingOrder.getBuyer().isMailVerified()) {
View Full Code Here

 
    /* (non-Javadoc)
     * @see org.jayasoft.woj.portal.data.dao.hibernate.DefaultHibernateWOJDao#newHandledObject()
     */
    public WOJObject newHandledObject() {
        return new PaymentInfo();
    }
View Full Code Here

TOP

Related Classes of org.jayasoft.woj.portal.model.PaymentInfo

Copyright © 2018 www.massapicom. 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.