Package org.openquark.cal.internal.runtime.lecc

Examples of org.openquark.cal.internal.runtime.lecc.RTPartialApp$_6$_2


   * order after the customer has been charged and the order has been
   * delivered.
   * @param orderNumber Google Checkout-assigned order number
   */
  public Document archiveOrder(String orderNumber) throws ProtocolException {
    ArchiveOrderRequest archiveRequest
        = _objectFact.createArchiveOrderRequest();
    archiveRequest.setGoogleOrderNumber(orderNumber);
    JAXBElement<ArchiveOrderRequest> archiveOrder
        = _objectFact.createArchiveOrder(archiveRequest);
    return convertToDOM(archiveOrder);
  }
View Full Code Here


   * @param comment Additional comments from the merchant regarding the
   * order cancellation
   */
  public Document cancelOrder(String orderNumber, String reason, String comment)
      throws ProtocolException {
    CancelOrderRequest cancelRequest = _objectFact.createCancelOrderRequest();
    cancelRequest.setGoogleOrderNumber(orderNumber);
    cancelRequest.setReason(reason);
    cancelRequest.setComment(comment);
    JAXBElement<CancelOrderRequest> elem
        = _objectFact.createCancelOrder(cancelRequest);
    return convertToDOM(elem);
  }
View Full Code Here

    if (cartExpire != null) {
      GregorianCalendar gCal = new GregorianCalendar();
      gCal.setTime(cartExpire);
      XMLGregorianCalendar xmlCalendar
          = _dataFactory.newXMLGregorianCalendar(gCal);
      CartExpiration cartExpiry = _objectFact.createCartExpiration();
      cartExpiry.setGoodUntilDate(xmlCalendar);
      cart.setCartExpiration(cartExpiry);
    }

    // Add merchantPrivateData if it is provided
    if (merchantPrivateData != null) {
View Full Code Here

     
      // Add the expiration date if one is provided
      if (cartExpire != null) {
        GregorianCalendar gCal = new GregorianCalendar();
        gCal.setTime(cartExpire);
        CartExpiration cartExpiry = _objectFact.createCartExpiration();
        cartExpiry.setGoodUntilDate(gCal);
        cart.setCartExpiration(cartExpiry);
      }
 
      // Add merchantPrivateData if it is provided
      if (merchantPrivateData != null) {
View Full Code Here

 
  private class ChargeEventHandler extends CallBackEventHandler
      implements ChargeNotificationListener {
    public void handleEvent(CallBackEvent event) {
      ChargeNotificationEvent chargeEvent = (ChargeNotificationEvent) event;
      ChargeAmountNotification chargeNote = chargeEvent.getChargeAmountNote();
      assertSame(ChargeAmountNotification.class, chargeNote.getClass());
    }
View Full Code Here

   * @param currency 3-letter ISO-4217 currency code: USD, JPY, GBP
   */
  public Document chargeOrder(String orderNumber, float amount, String currency)
      throws ProtocolException {
    Money money = createMoney(amount, currency);
    ChargeOrderRequest chargeReq = _objectFact.createChargeOrderRequest();
    chargeReq.setGoogleOrderNumber(orderNumber);
    chargeReq.setAmount(money);
    JAXBElement<ChargeOrderRequest> elem
        = _objectFact.createChargeOrder(chargeReq);
    return convertToDOM(elem);
  }
View Full Code Here

 
  private class ChargebackEventHandler extends CallBackEventHandler
      implements ChargebackNotificationListener {
    public void handleEvent(CallBackEvent event) {
      ChargebackNotificationEvent chargeBackEvent = (ChargebackNotificationEvent) event;
      ChargebackAmountNotification chargeBack
        = chargeBackEvent.getChargeBackNote();
      assertSame(ChargebackAmountNotification.class, chargeBack.getClass());
    }
View Full Code Here

    }
   
    CheckoutFlowSupport flowSupport
        = _objectFact.createCheckoutShoppingCartCheckoutFlowSupport();
    flowSupport.setMerchantCheckoutFlowSupport(checkoutFlowSupport);
    CheckoutShoppingCart chkoutCart = _objectFact.createCheckoutShoppingCart();
    chkoutCart.setShoppingCart(cart);
    chkoutCart.setCheckoutFlowSupport(flowSupport);
    JAXBElement<CheckoutShoppingCart> elem
        = _objectFact.createCheckoutShoppingCart(chkoutCart);
    return convertToDOM(elem);
  }
View Full Code Here

    if (cart == null) {
      throw new ProtocolException("both cart and flow support cannot be null");
    }
   
    CheckoutFlowSupport flowSupport
        = _objectFact.createCheckoutShoppingCartCheckoutFlowSupport();
    flowSupport.setMerchantCheckoutFlowSupport(checkoutFlowSupport);
    CheckoutShoppingCart chkoutCart = _objectFact.createCheckoutShoppingCart();
    chkoutCart.setShoppingCart(cart);
    chkoutCart.setCheckoutFlowSupport(flowSupport);
    JAXBElement<CheckoutShoppingCart> elem
        = _objectFact.createCheckoutShoppingCart(chkoutCart);
View Full Code Here

  * Test method for 'com.google.checkout.sample.protocol.MerchantCalculationResultBuilder.createCouponResult(boolean, float, String, String)'
  */
  public void testCreateCouponResult() throws Exception {
    MerchantCalculationResultBuilder builder
        = MerchantCalculationResultBuilder.getInstance();
    CouponResult result1 = builder.createCouponResult(true, 10.00F,
        "C10983488", "coupon 10");
    assertEquals("C10983488", result1.getCode());
   
    try {
      CouponResult invalidCoupon
          = builder.createCouponResult(false, -100.00F, "X1093432222",
              "coupon -100");
    } catch (ProtocolException protoEx) {
      assertContains(protoEx.getMessage(), "negative");
    }
View Full Code Here

TOP

Related Classes of org.openquark.cal.internal.runtime.lecc.RTPartialApp$_6$_2

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.