Payment System

The payment system of SGAgent provides following APIs.

Start product purchase process
boolean buyProduct(UProduct product)
Get job state of information retrieval state machine
int getJobState()
Start process of order infomation list retrieval
boolean getOrderInfoList(String filter)
Start process of getting order state
boolean getOrderState(String orderID)
Get state of product purchase state machine
int getPayState()
Look up product by orderID
UProduct getProductByOrderID(String orderID)
Get job state of product list retrieval
boolean getProducts(String filter, boolean sorting)
Set time intervals to wait before send order state query
void setOrderStateCheckingIntervals(int[] intervals)
Ask SGAgent to send next order information via onOrderInfoFound
void wantOrderInfo()
Ask SGAgent to send next product information via onProductFound
void wantProduct()
Start process of treasure list retrieval
boolean getTreasureList()
Start process of treasure count increment
boolean incTreasure(String name, int value)

Please refer to SGAgent Document for details.