Package com.google.checkout.schema._2

Examples of com.google.checkout.schema._2.MerchantCalculationResults


   
    TaxTables taxTables = _objectFact.createTaxTables();
    taxTables.setDefaultTaxTable(defaultTaxTable);
    taxTables.setAlternateTaxTables(aTables);
   
    MerchantCheckoutFlowSupport mChkoutSupport
        = _objectFact.createMerchantCheckoutFlowSupport();
    mChkoutSupport.setContinueShoppingUrl(continueShoppingUrl);
    mChkoutSupport.setEditCartUrl(editCartUrl);
    mChkoutSupport.setMerchantCalculations(couponInfo);
    mChkoutSupport.setShippingMethods(methods);
    mChkoutSupport.setTaxTables(taxTables);
    return mChkoutSupport;
  }
View Full Code Here


     
      TaxTables taxTables = _objectFact.createTaxTables();
      taxTables.setDefaultTaxTable(defaultTaxTable);
      taxTables.setAlternateTaxTables(aTables);
     
      MerchantCheckoutFlowSupport mChkoutSupport
          = _objectFact.createMerchantCheckoutFlowSupport();
      mChkoutSupport.setContinueShoppingUrl(continueShoppingUrl);
      mChkoutSupport.setEditCartUrl(editCartUrl);
      mChkoutSupport.setMerchantCalculations(couponInfo);
      mChkoutSupport.setShippingMethods(methods);
      mChkoutSupport.setTaxTables(taxTables);
      return mChkoutSupport;
    } catch (JAXBException jaxbEx) {
      throw new ProtocolException(jaxbEx.getMessage());
    }
  }
View Full Code Here

   * shipping method to be added.
   * @return list of {@see FlatRateShipping}, {@see MerchantCalculatedShipping},
   * {@see Pickup}
   */
  private ShippingMethods addShippingMethod(Object shippingMethod) {
    ShippingMethods methods
        = _objectFact.createMerchantCheckoutFlowSupportShippingMethods();
    List methodList
        = methods.getFlatRateShippingOrMerchantCalculatedShippingOrPickup();
    methodList.add(shippingMethod);
    return methods;
  }
View Full Code Here

   * @param amount Numeric amount to charge the customer.
   * @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);
View Full Code Here

   
    RefundOrderRequest refundRequest = _objectFact.createRefundOrderRequest();
    refundRequest.setGoogleOrderNumber(orderNumber);
    refundRequest.setReason(reason);
    if (amount > 0.0F && !StringUtil.isEmpty(currency)) {
      Money refundAmount = createMoney(amount, currency);
      refundRequest.setAmount(refundAmount);
    }
   
    JAXBElement<RefundOrderRequest> refundOrder
        = _objectFact.createRefundOrder(refundRequest);
View Full Code Here

   */
  public Item createShoppingItem(String itemName, String itemDesc,
      int quantity, float unitPrice, String currency,
      String taxTableSelector, Element privateItemData)
      throws ProtocolException {
    Money money = createMoney(unitPrice, currency);
    Item item = _objectFact.createItem();
    item.setItemName(itemName);
    item.setItemDescription(itemDesc);
    item.setQuantity(quantity);
    item.setUnitPrice(money);
View Full Code Here

      throws ProtocolException {
    if (price < 0.0d) {
      throw new ProtocolException("price cannot be negative");
    }
   
    Money money = _objectFact.createMoney();
    BigDecimal bigNum = new BigDecimal(price);
    bigNum = bigNum.setScale(2, RoundingMode.HALF_EVEN);
    money.setValue(bigNum);
    if (!StringUtil.isEmpty(currency)) {
      money.setCurrency(currency);
    } else {
      money.setCurrency("USD");
    }
    return money;
  }
View Full Code Here

      int quantity, float unitPrice, String currency,
      String taxTableSelector, Element privateItemData)
      throws ProtocolException {
   
    try {
      Money money = createMoney(unitPrice, currency);
      Item item = _objectFact.createItem();
      item.setItemName(itemName);
      item.setItemDescription(itemDesc);
      item.setQuantity(quantity);
      item.setUnitPrice(money);
View Full Code Here

  private class NewOrderEventHandler extends CallBackEventHandler
      implements NewOrderNotificationListener {
    public void handleEvent(CallBackEvent event) {
      NewOrderNotificationEvent newOrder = (NewOrderNotificationEvent) event;
      NewOrderNotification newOrderNote = newOrder.getNewOrderNote();
      assertSame(NewOrderNotification.class, newOrderNote.getClass());
    }
View Full Code Here

   */
  private static Logger _logger
    = Logger.getLogger(AbstractProtocolBuilder.class.getName());
 
  protected AbstractProtocolBuilder() throws JAXBException, ProtocolException {
    _objectFact = new ObjectFactory();
    _xmlMarshaller = createXmlMarshaller();
    _xmlUnMarshaller = createXmlUnMashaller();
    _domBuilder = createDomBuilder();
  }
View Full Code Here

TOP

Related Classes of com.google.checkout.schema._2.MerchantCalculationResults

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.