This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Onsite Payment Request Charge requires bother the OPR_Token & Customers Confirmation Token | |
if (invoice.Charge ("OPR_TOKEN", "CUSTOMER_CONFIRM_TOKEN")) { | |
Console.WriteLine(invoice.Status); | |
Console.WriteLine(invoice.ResponseText); | |
Console.WriteLine(invoice.GetReceiptUrl()); | |
Console.WriteLine(invoice.GetCustomerInfo("name")); | |
Console.WriteLine(invoice.GetCustomerInfo("email")); | |
} else { | |
Console.WriteLine(invoice.Status); | |
Console.WriteLine(invoice.ResponseText); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Onsite Payment Request requires the mpower customer account alias as the parameter | |
if (invoice.Create("MPOWER_CUSTOMER_USERNAME_OR_PHONENO")) { | |
Console.WriteLine (invoice.Token); | |
Console.WriteLine (invoice.Status); | |
Console.WriteLine (invoice.ResponseText); | |
} else { | |
Console.WriteLine (invoice.ResponseText); | |
Console.WriteLine (invoice.Status); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// If you wish to accept payments directly on your service | |
// Please note that the constructor requires a instance of both | |
// MPowerSetup & MPowerStore Classes respectively | |
MPowerOnsiteInvoice invoice = new MPowerOnsiteInvoice (setup, store); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// If you intend to use a simpler approach by redirecting to the MPower checkout page | |
// Please note that the constructor requires a instance of both | |
// MPowerSetup & MPowerStore Classes respectively | |
MPowerCheckoutInvoice invoice = new MPowerCheckoutInvoice (setup, store); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// If you intend to use a simpler approach by redirecting to the MPower checkout page | |
$invoice = new MPower_Checkout_Invoice(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// If you wish to accept payments directly on your service | |
$invoice = new MPower_Onsite_Invoice(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Onsite Payment Request requires the mpower customer account alias as the parameter | |
if(invoice->create("MPOWER_CUSTOMER_USERNAME_OR_PHONENO")) { | |
echo $invoice->getStatus(); | |
echo $invoice->response_text; | |
echo $invoice->token; | |
} else { | |
echo $invoice->getStatus(); | |
echo $invoice->response_text; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Onsite Payment Request Charge requires bother the OPR_Token & Customers Confirmation Token | |
if($invoice->charge("OPR_TOKEN","CUSTOMER_CONFIRM_TOKEN")) { | |
echo $invoice->getStatus(); | |
echo $invoice->response_text; | |
echo $invoice->getReceiptUrl(); | |
echo $invoice->getCustomerInfo("name"); | |
echo $invoice->getCustomerInfo("email"); | |
} else { | |
echo $invoice->getStatus(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Onsite Payment Request Charge requires bother the OPR_Token & Customers Confirmation Token | |
if invoice.charge("OPR_TOKEN","CUSTOMER_CONFIRM_TOKEN") | |
puts invoice.status | |
puts invoice.response_text | |
puts invoice.receipt_url | |
puts invoice.get_customer_info("name") | |
puts invoice.get_customer_info("email") | |
else | |
puts invoice.status | |
puts invoice.response_text |