Jump to content

2checkout Calc Total Transaction Fees - class


thiwankalk

Recommended Posts

<?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]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.