<?php

require 'mpower_php/mpower.php';
MPower_Setup::setMasterKey("dd6f2c90-f075-012f-5b69-00155d866600");
MPower_Setup::setPublicKey("live_public_xDPNs0zAJ856YfC3z6rBwGsjqBA");
MPower_Setup::setPrivateKey("live_private_0mhrAda3hiiEfIirJYRC7w77moY");
MPower_Setup::setMode("live");
MPower_Setup::setToken("d13ab6c069296cfff556");
// Configure Checkout Store
MPower_Checkout_Store::setName("Awesome Online Store");
MPower_Checkout_Store::setTagline("Awesome localhost.localdomain online store tagline ");
MPower_Checkout_Store::setPhoneNumber("0244000001");
MPower_Checkout_Store::setPostalAddress("P. O. Box AN 1010. Accra - Ghana.");
// You may set this to your localhost for local testing of redirects
// MPower_Checkout_Store::setCancelUrl("http://".$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])."/index.php");
// MPower_Checkout_Store::setReturnUrl("http://".$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME'])."/confirm.php");
Exemple #2
0
    MPower_Setup::setPublicKey("test_public_rg2qugm3CWU2J-xvi14KE4-AYGY");
    MPower_Setup::setPrivateKey("test_private_eBw1XNZOWtx8XTvDMuZCDZot8I4");
    MPower_Setup::setMode("test");
    MPower_Setup::setToken("0b8275226b2ec2da5458");
} else {
    MPower_Setup::setMasterKey("90a2f8a1-7f7b-471f-bdb4-268a270985d4");
    MPower_Setup::setPublicKey("live_public_qj5brK9VO3LbA8xSPE8IPtyExf4");
    MPower_Setup::setPrivateKey("live_private_b1wT60n7jXB4zlMaC67gIjNDC3s");
    MPower_Setup::setMode("live");
    MPower_Setup::setToken("314891080ac32d5c94de");
}
// Configure Checkout Store
MPower_Checkout_Store::setName("CND GLOBAL FASHION");
MPower_Checkout_Store::setTagline("A Touch Of African Fashion");
MPower_Checkout_Store::setPhoneNumber("+3361877452626/+336752517819");
MPower_Checkout_Store::setPostalAddress("130 Grande Rue 92310 \n Paris Servres");
//$invoice = new MPower_Checkout();
$invoice = new MPower_Checkout_Invoice();
$invoice->setCancelUrl("http://www.cndglobalfashion.com/Mpower/Cancel.php");
$invoice->setReturnUrl("http://www.cndglobalfashion.com/Mpower/Success.php");
/* Adding items to your invoice is very basic, the parameters expected are
		name_of_item, quantity, unit_price, total_price and optional item
		description. */
@session_start();
//@session_destroy();
$i = 0;
$ids = "";
$q = 0;
$total = 0.0;
$tax = 2.0;
for (; $i < count($_SESSION['cartid']); $i++) {