Sie sind auf Seite 1von 2

{lastName=Jaju, militaryAddressInd=false, state=CA, address1=421 Pass Ave, addre

ss2=, country=US, city=Burbank, default=default, postalCode=91505, phoneNumber=8


181818181, expirationMonth=01, expirationYear=2013, creditCardNumber=55555555555
54444, firstName=Girish, creditCardType=mastercard}

// validate credit card information


/*
* if (!validateCreateCreditCardInformation(pRequest, pResponse)) {
* return checkFormRedirect(null, getCreateCardErrorURL(), pRequest,
* pResponse); }
*/
TransactionManager tm = getTransactionManager();
TransactionDemarcation td = getTransactionDemarcation();
BBProfileTools profileTools = (BBProfileTools) getProfileTools();
Profile profile = getProfile();
// Get editValue map, containing the credit card properties
HashMap newCard = (HashMap) getEditValue();
HashMap newAddress = (HashMap) getBillAddrValue();
try {
if (tm != null) {
td.begin(tm, TransactionDemarcation.REQUIRED);
}
// Check to see if user is selecting existing address
// or is entering a new address for the credit card
/*
* String secondaryAddrNickname = (String) newAddress
* .get(getShippingAddressNicknameMapKey()); boolean isNewAddress =
* false; if (secondaryAddrNickname.equalsIgnoreCase("NEW")) {
* isNewAddress = true; secondaryAddrNickname = (String) newAddress
* .get(getNicknameValueMapKey()); }
*/
try {
// Create credit card and add to profile
profileTools.createBBProfileCreditCard(profile, newCard,
cardNickname, newAddress);
// if user has no default credit card make new one as default
profileTools.setDefaultCreditCardIfNull(profile, cardNickname);
// empty out the map
newCard.clear();
newAddress.clear();
} catch (RepositoryException repositoryExc) {
generateFormException("errorCreatingCreditCard", repositoryExc,
pRequest);
if (isLoggingError()) {
logError(LogUtils.formatMajor(repositoryExc.getMessage()),
repositoryExc);
}
} catch (InstantiationException ex) {
throw new ServletException(ex);
} catch (IllegalAccessException ex) {
throw new ServletException(ex);
} catch (ClassNotFoundException ex) {
throw new ServletException(ex);
} catch (IntrospectionException ex) {
throw new ServletException(ex);
} catch (PropertyNotFoundException ex) {
throw new ServletException(ex);
}
return checkFormRedirect(getCreateCardSuccessURL(),
getCreateCardErrorURL(), pRequest, pResponse);
} catch (TransactionDemarcationException e) {
throw new ServletException(e);
} finally {
try {
if (tm != null) {
td.end();
}
} catch (TransactionDemarcationException e) {
}
}

==================
<?xml version="1.0" encoding="UTF-8"?><Response><ProfileResp><CustomerBi
n>000001</CustomerBin><CustomerMerchantID>062906</CustomerMerchantID><CustomerNa
me></CustomerName><CustomerRefNum>4210334</CustomerRefNum><CustomerProfileAction
>CREATE</CustomerProfileAction><ProfileProcStatus>0</ProfileProcStatus><Customer
ProfileMessage>Profile Request Processed</CustomerProfileMessage><CustomerAddres
s1></CustomerAddress1><CustomerAddress2></CustomerAddress2><CustomerCity></Custo
merCity><CustomerState></CustomerState><CustomerZIP></CustomerZIP><CustomerEmail
></CustomerEmail><CustomerPhone></CustomerPhone><CustomerProfileOrderOverrideInd
>NO</CustomerProfileOrderOverrideInd><OrderDefaultDescription>Profile Update</Or
derDefaultDescription><OrderDefaultAmount></OrderDefaultAmount><CustomerAccountT
ype>CC</CustomerAccountType><CCAccountNum>4222222222222</CCAccountNum><CCExpireD
ate>0112</CCExpireDate><ECPAccountDDA></ECPAccountDDA><ECPAccountType></ECPAccou
ntType><ECPAccountRT></ECPAccountRT><ECPBankPmtDlv></ECPBankPmtDlv><SwitchSoloSt
artDate></SwitchSoloStartDate><SwitchSoloIssueNum></SwitchSoloIssueNum><RespTime
></RespTime></ProfileResp></Response>

Das könnte Ihnen auch gefallen