Skip to content

Commit

Permalink
added checkBalance Method
Browse files Browse the repository at this point in the history
  • Loading branch information
swiftugandan committed Jun 18, 2011
1 parent 126bb04 commit 41d8afe
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
Binary file modified bin/ug/co/yo/payments/YoPaymentsAPIClient.class
Binary file not shown.
Binary file modified bin/ug/co/yo/payments/YoPaymentsSample.class
Binary file not shown.
11 changes: 11 additions & 0 deletions src/ug/co/yo/payments/YoPaymentsAPIClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,17 @@ public String createInternalTransferXml(String CurrencyCode, float Amount,
"</AutoCreate>";
}

public String createBalanceCheckXml(){
return "<?xml version='1.0' encoding='UTF-8'?>" +
"<AutoCreate>" +
"<Request>" +
"<APIUsername>"+APIUsername+"</APIUsername>" +
"<APIPassword>"+APIPassword+"</APIPassword>"+
"<Method>acacctbalance</Method>"+
"</Request>"+
"</AutoCreate>";
}

private static String checkInternalReference(String InternalReference) {
if (!InternalReference.isEmpty()) {
return "<InternalReference>" + InternalReference + "</InternalReference>";
Expand Down
3 changes: 2 additions & 1 deletion src/ug/co/yo/payments/YoPaymentsSample.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ public final static void main(String[] args) throws Exception {
YoPaymentsAPIClient yoPaymentsClient= new YoPaymentsAPIClient("90004135493","1203036617");

//String inputXML = yoPaymentsClient.createWithdrawalXml(1000,"25677123456","Narrative 6" );
String inputXML = yoPaymentsClient.createWithdrawalXml(1000, "25677123456", "", "This is a Narrative", "Readme.txt", "", "2");
//String inputXML = yoPaymentsClient.createWithdrawalXml(1000, "25677123456", "", "This is a Narrative", "Readme.txt", "", "2");
//String inputXML = yoPaymentsClient.createDepositXml(1000000, "25677123456", "Narrative 6");
String inputXML = yoPaymentsClient.createBalanceCheckXml();

String serviceUrl = "https://41.220.12.206/services/yopaymentsdev/task.php";

Expand Down

0 comments on commit 41d8afe

Please sign in to comment.