developer:soap:methods:addcustomerpaymentmethod

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
developer:soap:methods:addcustomerpaymentmethod [2009/08/28 16:52]
tem
developer:soap:methods:addcustomerpaymentmethod [2009/09/08 09:40] (current)
charlie
Line 104: Line 104:
  
 ?>  ?> 
 +</​code>​
 +
 +
 +==== Java ====
 +
 +This example uses the [[developer/​javalibrary|USAePay Java library]]. ​ For directions on how to install the library and create the token/​client objects, go to either the [[..:​howto:​javajaxrpc|Java JAX-RPC Howto]] or the [[..:​howto:​javajaxws|Java JAX-WS Howto]].
 +
 +
 +<code java>
 +try {
 +
 +//Setting Customer Number
 +BigInteger custnum = new BigInteger("​12345678"​);​
 +
 +//Setting up New Payment Method
 +PaymentMethod paymethod = new PaymentMethod();​
 + paymethod.setExpires("​2012-09-01"​);​
 + CreditCardData ccdata = new CreditCardData();​
 + ccdata.setCardNumber("​4000100011112224"​);​
 + ccdata.setCardExpiration("​0912"​);​
 + ccdata.setAvsStreet("​123 Main"​);​
 + ccdata.setAvsZip("​12345"​);​
 + paymethod.setCreditCardData(ccdata);​
 + paymethod.setMethodName("​My Visa"​);​
 +
 +
 +//Adding Payment Method
 +BigInteger PaymentMethodID = client.addCustomerPaymentMethod(token,​ custnum, paymethod, true, true);
 +
 +} catch (Exception e) {
 + System.out.println("​Soap Exception: " + e.getMessage());​
 +}
 </​code>​ </​code>​
  
developer/soap/methods/addcustomerpaymentmethod.txt ยท Last modified: 2009/09/08 09:40 by charlie

Page Tools