thiwankalk Posted October 6, 2008 Share Posted October 6, 2008 <?php #pay.php #Developer thiwanka #2co payment 2CO applies a 5.5% commission on each transaction, plus a $0.45 charge per transaction. # Return _construct(yourammount) function Total Transaction Fees include('pay.class.php'); $Object = new TCO; echo $Object->_construct(100); ?> <?php #pay.class.php #Developer thiwanka #2co payment 2CO applies a 5.5% commission on each transaction, plus a $0.45 charge per transaction. # Return PayDoller function Total Transaction Fees class TCO{ function _construct($Amount){ return round((float)$this->PayDoller($Amount),2); } function PayDoller($PureTotal,$commision=5.5,$pertransaction=0.45){ $Total=0.00; $Total=(float)$PureTotal*($commision/100)+$pertransaction; $Total=$PureTotal+$Total; return $Total; } } ?> ask anything. [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/127227-2checkout-calc-total-transaction-fees-class/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.