Skip to content

Instantly share code, notes, and snippets.

@nukturnal
Last active October 12, 2015 12:28
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/4027325 to your computer and use it in GitHub Desktop.
Save nukturnal/4027325 to your computer and use it in GitHub Desktop.
MPower PHP Checkout Invoice setup
<?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. */
$invoice->addItem("13' Apple Retina 500 HDD",1,10.99,10.99);
$invoice->addItem("Case Logic laptop Bag",2,100.50,201,"Optional description");
$invoice->addItem("Philips electric shaver",2,50.50,101.00);
/* You can optionally set a general invoice description text which can
be used in cases where your invoice does not need an items list or in cases
where you need to include some extra descriptive information to your invoice */
$invoice->setDescription("Optional Invoice description here");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment