Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

SDK example of setting the 10 custom fields then getting them after processing the transaction:

Code Block
//Set
Method
BankCardTransaction o_bc_transaction = new BankCardTransaction();
o_bc_transaction.setType( BankCardTransaction.XS_BCT_TYPE_SALE );
o_bc_transaction.setAmount(10.99);
o_bc_transaction.setCardName("Sample Bank Card Transaction");
o_bc_transaction.setCardNumber("4111111111111111");
o_bc_transaction.setCardExpirationMonth("08");
o_bc_transaction.setCardExpirationYear("2024");
o_bc_transaction.setCustomField1("field 1");
o_bc_transaction.setCustomField2("field 2");
o_bc_transaction.setCustomField3("field 3");
o_bc_transaction.setCustomField4("field 4");
o_bc_transaction.setCustomField5("field 5");
o_bc_transaction.setCustomField6("field 6");
o_bc_transaction.setCustomField7("field 7");
o_bc_transaction.setCustomField8("field 8");
o_bc_transaction.setCustomField9("field 9");
o_bc_transaction.setCustomField10("field 10");
        

BaseCommerceClient o_client = new BaseCommerceClient( XS_USERNAME, XS_PASSWORD, XS_KEY );
o_client.setSandbox(true);

o_bc_transaction = o_client.processBankCardTransaction( o_bc_transaction );

System.out.println( o_bc_transaction.getCustomField1() );
System.out.println( o_bc_transaction.getCustomField2() );
System.out.println( o_bc_transaction.getCustomField3() );
System.out.println( o_bc_transaction.getCustomField4() );
System.out.println( o_bc_transaction.getCustomField5() );
System.out.println( o_bc_transaction.getCustomField6() );
System.out.println( o_bc_transaction.getCustomField7() );
System.out.println( o_bc_transaction.getCustomField8() );
System.out.println( o_bc_transaction.getCustomField9() );
System.out.println( o_bc_transaction.getCustomField10() );

...