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]

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.