Skip to content

Instantly share code, notes, and snippets.

@nukturnal
Created November 15, 2012 22:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nukturnal/4082089 to your computer and use it in GitHub Desktop.
Save nukturnal/4082089 to your computer and use it in GitHub Desktop.
MPower Java OPR charge
// Onsite Payment Request Charge requires bother the OPR_Token & Customers Confirmation Token
if (invoice.charge("OPR_TOKEN", "CUSTOMER_CONFIRM_TOKEN")) {
System.out.println("Status" + invoice.getStatus());
System.out.println("Response Message" + invoice.getResponseText());
System.out.println("Receipt URL" + invoice.getReceiptUrl());
System.out.println("Customer Name" + invoice.getCustomerInfo("name"));
System.out.println("Customer Email" + invoice.getCustomerInfo("email"));
} else {
System.out.println("Status" + invoice.getStatus());
System.out.println("Response Message" + invoice.getResponseText());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment