|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.locomotive.commerce.ics.ICSRequest
A wrapper class for generating proper SCMPMessages. This implementation is not written to support access by multiple concurrent threads, so it is suggested that you avoid doing it. Also, Cybersource does not recommend adding more than 32 offers to SCMPMessage via their C library, and therefore we don't recommend it here either. :-) The characters ':', '^', ',' (colon, caret, comma) must not be in any of the names or values, as they are used by the underlying transport mechanism as field separators. There is no known way to escape these characters - don't use them. The addField () calls used internally are not always checked to see if they fail. With the exception of low memory circumstances, this should not be a problem. Please see the Cybersource CommerceFLEX API documentation for more information.
Constructor Summary | |
ICSRequest(boolean debug_on,
java.lang.String hostname,
java.lang.String keyname)
|
Method Summary | |
void |
addField(java.lang.String name,
java.lang.String value)
The following method allows you to add your own fields to the SCMP message. |
void |
addOffer(Offer next_offer)
adds the specified offer to the list (Vector) of offers associated with this ICSRequest. |
void |
clearOffers()
deletes or removes any offers that were added to this request. |
void |
requestBill(java.lang.String ordernumber)
request the ICS service "ics_bill" |
void |
requestBill(java.lang.String ordernumber,
java.lang.String totalamount)
request the ICS service "ics_bill" for the specified amount |
void |
requestCredit(java.lang.String ordernumber,
java.lang.String totalamount)
request the ICS service "ics_credit" |
void |
requestDownload()
|
void |
requestExportCheck()
request the ICS service "ics_export" |
void |
requestFraudScore(java.lang.String ipaddress)
request that the fraud score be generated. |
void |
requestFulfillmentNotify(java.lang.String who)
request that the fulfillment house be notified. |
void |
requestPreApp()
request the ICS service "ics_preapp" Requesting this service is necessary before any funds can be transferred from customer credit cards to the account of the merchant. |
void |
requestTaxCalculation()
request the tax calculation service. |
ICSReply |
send()
sends the request to the |
void |
setBuyerInfo(java.lang.String firstname,
java.lang.String lastname,
java.lang.String email,
java.lang.String phone,
java.lang.String address1,
java.lang.String city,
java.lang.String state,
java.lang.String zip,
java.lang.String country,
java.lang.String ccnum,
java.lang.String expmo,
java.lang.String expyr)
Necessary for any order. |
void |
setComment(java.lang.String comment,
int field_no)
set one of the 8 comment fields. |
void |
setComments(java.lang.String comments)
set the comment field. |
void |
setOptionalBuyerInfo(java.lang.String company,
java.lang.String address2)
Optional information to accompany an order. |
void |
setShipAddress(java.lang.String shipaddress1,
java.lang.String shipaddress2,
java.lang.String shipcity,
java.lang.String shipstate,
java.lang.String shipzip,
java.lang.String shipcountry)
Set optional Shipping address information. |
void |
setSubRefNumber(java.lang.String sub_ref_no)
the SubRefNumber will be passed along to the fulfillment house. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ICSRequest(boolean debug_on, java.lang.String hostname, java.lang.String keyname) throws SCMPException
Method Detail |
public void requestBill(java.lang.String ordernumber)
public void requestBill(java.lang.String ordernumber, java.lang.String totalamount)
public void requestCredit(java.lang.String ordernumber, java.lang.String totalamount)
public void requestExportCheck()
public void requestPreApp()
public void setBuyerInfo(java.lang.String firstname, java.lang.String lastname, java.lang.String email, java.lang.String phone, java.lang.String address1, java.lang.String city, java.lang.String state, java.lang.String zip, java.lang.String country, java.lang.String ccnum, java.lang.String expmo, java.lang.String expyr)
public void setOptionalBuyerInfo(java.lang.String company, java.lang.String address2)
public void addField(java.lang.String name, java.lang.String value)
ics_req.addField ("cctype", "visa");In this example, "cctype" is not a field that is defined in ICS.
public void setShipAddress(java.lang.String shipaddress1, java.lang.String shipaddress2, java.lang.String shipcity, java.lang.String shipstate, java.lang.String shipzip, java.lang.String shipcountry)
public void setComments(java.lang.String comments)
public void setComment(java.lang.String comment, int field_no)
comment
- the comment to enterfield_no
- the comment field to enter the comment into. Can
be from 0 to 7.public void setSubRefNumber(java.lang.String sub_ref_no)
public void addOffer(Offer next_offer)
public void clearOffers()
public void requestFulfillmentNotify(java.lang.String who)
public void requestDownload()
public void requestFraudScore(java.lang.String ipaddress)
public void requestTaxCalculation()
public ICSReply send() throws SCMPException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |