Package com.google.checkout.notification

Examples of com.google.checkout.notification.Address


        Debug.logInfo("-- Product Store : " + productStoreId, module);
        Debug.logInfo("-- Locale : " + locale.toString(), module);
        Debug.logInfo("-- Google Order # : " + externalId, module);

        // set the customer information
        Address shippingAddress = info.getBuyerShippingAddress();
        Address billingAddress = info.getBuyerBillingAddress();
        String[] partyInfo = getPartyInfo(shippingAddress, billingAddress);
        if (partyInfo == null || partyInfo.length != 3) {
            throw new GeneralException("Unable to parse/create party information, invalid number of parameters returned");
        }

        cart.setOrderPartyId(partyInfo[0]);
        cart.setPlacingCustomerPartyId(partyInfo[0]);
        cart.setShippingContactMechId(partyInfo[1]);

        // contact info
        String shippingEmail = shippingAddress.getEmail();
        if (UtilValidate.isNotEmpty(shippingEmail)) {
            setContactInfo(cart, "PRIMARY_EMAIL", shippingEmail);
        }
        String billingEmail = billingAddress.getEmail();
        if (UtilValidate.isNotEmpty(billingEmail)) {
            setContactInfo(cart, "BILLING_EMAIL", billingEmail);
        }
        String shippingPhone = shippingAddress.getPhone();
        if (UtilValidate.isNotEmpty(shippingPhone)) {
            setContactInfo(cart, "PHONE_SHIPPING", shippingPhone);
        }
        String billingPhone = billingAddress.getPhone();
        if (UtilValidate.isNotEmpty(billingPhone)) {
            setContactInfo(cart, "PHONE_BILLING", billingPhone);
        }

        // set the order items
View Full Code Here


        Debug.logInfo("-- Product Store : " + productStoreId, module);
        Debug.logInfo("-- Locale : " + locale.toString(), module);
        Debug.logInfo("-- Google Order # : " + externalId, module);

        // set the customer information
        Address shippingAddress = info.getBuyerShippingAddress();
        Address billingAddress = info.getBuyerBillingAddress();
        String[] partyInfo = getPartyInfo(shippingAddress, billingAddress);
        if (partyInfo == null || partyInfo.length != 3) {
            throw new GeneralException("Unable to parse/create party information, invalid number of parameters returned");
        }

        cart.setOrderPartyId(partyInfo[0]);
        cart.setPlacingCustomerPartyId(partyInfo[0]);
        cart.setShippingContactMechId(partyInfo[1]);

        // contact info
        String shippingEmail = shippingAddress.getEmail();
        if (UtilValidate.isNotEmpty(shippingEmail)) {
            setContactInfo(cart, "PRIMARY_EMAIL", shippingEmail);
        }
        String billingEmail = billingAddress.getEmail();
        if (UtilValidate.isNotEmpty(billingEmail)) {
            setContactInfo(cart, "BILLING_EMAIL", billingEmail);
        }
        String shippingPhone = shippingAddress.getPhone();
        if (UtilValidate.isNotEmpty(shippingPhone)) {
            setContactInfo(cart, "PHONE_SHIPPING", shippingPhone);
        }
        String billingPhone = billingAddress.getPhone();
        if (UtilValidate.isNotEmpty(billingPhone)) {
            setContactInfo(cart, "PHONE_BILLING", billingPhone);
        }

        // set the order items
View Full Code Here

TOP

Related Classes of com.google.checkout.notification.Address

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.