/** https://stripe.com/docs/api#create_charge */ private static Map<String,Object> makeShippingParams(TransactionRequest transactionRequest, CreditCard creditCard, boolean update) { Map<String,Object> shippingParams = new HashMap<String,Object>(); addParam(update, shippingParams, "address", makeShippingAddressParams(transactionRequest, update)); addParam(update, shippingParams, "name", CreditCard.getFullName(transactionRequest.getShippingFirstName(), transactionRequest.getShippingLastName())); // Phone cannot be in the shipping by itself if(!shippingParams.isEmpty()) addParam(update, shippingParams, "phone", creditCard.getPhone()); // Unused: tracking_number return shippingParams; } // </editor-fold>
String shiplname = transactionRequest.getShippingLastName(); if(shiplname!=null && shiplname.length()>0) request.put("UMshiplname", shiplname); String shipcompany = transactionRequest.getShippingCompanyName();
addField(querySB, "x_ship_to_last_name", transactionRequest.getShippingLastName()); addField(querySB, "x_ship_to_company", transactionRequest.getShippingCompanyName()); addField(querySB, "x_ship_to_address", getStreetAddress(transactionRequest.getShippingStreetAddress1(), transactionRequest.getShippingStreetAddress2()));
String shippingFirstName = transactionRequest.getShippingFirstName(); if(shippingFirstName!=null && shippingFirstName.length()>0) shipTo.setShipToFirstName(shippingFirstName); String shippingLastName = transactionRequest.getShippingLastName(); if(shippingLastName!=null && shippingLastName.length()>0) shipTo.setShipToLastName(shippingLastName); String shippingStreetAddress1 = transactionRequest.getShippingStreetAddress1();
emptyStringIfNull(creditCard.getPhone()), emptyStringIfNull(creditCard.getFax()), emptyStringIfNull(CreditCard.getFullName(transactionRequest.getShippingFirstName(), transactionRequest.getShippingLastName())), emptyStringIfNull(getStreetAddress(transactionRequest.getShippingStreetAddress1(), transactionRequest.getShippingStreetAddress2())), emptyStringIfNull(transactionRequest.getShippingCity()), emptyStringIfNull(creditCard.getPhone()), emptyStringIfNull(creditCard.getFax()), emptyStringIfNull(CreditCard.getFullName(transactionRequest.getShippingFirstName(), transactionRequest.getShippingLastName())), emptyStringIfNull(getStreetAddress(transactionRequest.getShippingStreetAddress1(), transactionRequest.getShippingStreetAddress2())), emptyStringIfNull(transactionRequest.getShippingCity()), emptyStringIfNull(creditCard.getPhone()), emptyStringIfNull(creditCard.getFax()), emptyStringIfNull(CreditCard.getFullName(transactionRequest.getShippingFirstName(), transactionRequest.getShippingLastName())), emptyStringIfNull(getStreetAddress(transactionRequest.getShippingStreetAddress1(), transactionRequest.getShippingStreetAddress2())), emptyStringIfNull(transactionRequest.getShippingCity()), emptyStringIfNull(creditCard.getPhone()), emptyStringIfNull(creditCard.getFax()), emptyStringIfNull(CreditCard.getFullName(transactionRequest.getShippingFirstName(), transactionRequest.getShippingLastName())), emptyStringIfNull(getStreetAddress(transactionRequest.getShippingStreetAddress1(), transactionRequest.getShippingStreetAddress2())), emptyStringIfNull(transactionRequest.getShippingCity()),