String shipcity = transactionRequest.getShippingCity(); if(shipcity!=null && shipcity.length()>0) request.put("UMshipcity", shipcity); String shipstate = transactionRequest.getShippingState(); if(shipstate!=null && shipstate.length()>0) request.put("UMshipstate", shipstate); String shipzip = transactionRequest.getShippingPostalCode();
addField(querySB, "x_ship_to_address", getStreetAddress(transactionRequest.getShippingStreetAddress1(), transactionRequest.getShippingStreetAddress2())); addField(querySB, "x_ship_to_city", transactionRequest.getShippingCity()); addField(querySB, "x_ship_to_state", transactionRequest.getShippingState()); addField(querySB, "x_ship_to_zip", CreditCard.numbersOnly(transactionRequest.getShippingPostalCode())); addField(querySB, "x_ship_to_country", transactionRequest.getShippingCountryCode());
/** https://stripe.com/docs/api#create_charge */ private static Map<String,Object> makeShippingAddressParams(TransactionRequest transactionRequest, boolean update) { Map<String,Object> shippingAddressParams = new HashMap<String,Object>(); addParam(update, shippingAddressParams, "line1", transactionRequest.getShippingStreetAddress1()); addParam(update, shippingAddressParams, "line2", transactionRequest.getShippingStreetAddress2()); addParam(update, shippingAddressParams, "city", transactionRequest.getShippingCity()); addParam(update, shippingAddressParams, "state", transactionRequest.getShippingState()); addParam(update, shippingAddressParams, "postal_code", transactionRequest.getShippingPostalCode()); addParam(update, shippingAddressParams, "country", transactionRequest.getShippingCountryCode()); return shippingAddressParams; }
String shippingState = transactionRequest.getShippingState(); if(shippingState!=null && shippingState.length()>0) shipTo.setShipToState(shippingState); String shippingPostalCode = transactionRequest.getShippingPostalCode();
emptyStringIfNull(getStreetAddress(transactionRequest.getShippingStreetAddress1(), transactionRequest.getShippingStreetAddress2())), emptyStringIfNull(transactionRequest.getShippingCity()), emptyStringIfNull(transactionRequest.getShippingState()), emptyStringIfNull(transactionRequest.getShippingPostalCode()), emptyStringIfNull(transactionRequest.getShippingCountryCode()) emptyStringIfNull(getStreetAddress(transactionRequest.getShippingStreetAddress1(), transactionRequest.getShippingStreetAddress2())), emptyStringIfNull(transactionRequest.getShippingCity()), emptyStringIfNull(transactionRequest.getShippingState()), emptyStringIfNull(transactionRequest.getShippingPostalCode()), emptyStringIfNull(transactionRequest.getShippingCountryCode()) emptyStringIfNull(getStreetAddress(transactionRequest.getShippingStreetAddress1(), transactionRequest.getShippingStreetAddress2())), emptyStringIfNull(transactionRequest.getShippingCity()), emptyStringIfNull(transactionRequest.getShippingState()), emptyStringIfNull(transactionRequest.getShippingPostalCode()), emptyStringIfNull(transactionRequest.getShippingCountryCode()) emptyStringIfNull(getStreetAddress(transactionRequest.getShippingStreetAddress1(), transactionRequest.getShippingStreetAddress2())), emptyStringIfNull(transactionRequest.getShippingCity()), emptyStringIfNull(transactionRequest.getShippingState()), emptyStringIfNull(transactionRequest.getShippingPostalCode()), emptyStringIfNull(transactionRequest.getShippingCountryCode())