Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Tue Apr 16, 2024 11:18 pm
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Incorrect credit to calling cards when using paypal.
PostPosted: Fri Jan 12, 2007 12:06 pm 
Offline

Joined: Fri Dec 22, 2006 2:43 pm
Posts: 76
Location: London, UK
When a paypal payment is succesful, the customer's account is credited with the the amount paid for less the paypal fee. For example if someone pays $10 via paypal their card is credited with only $9.46 ($10 less $0.54 paypal fee). I don't think this is how it should be, the customer's card should be credited with the full $10.

Is their away to resolve this problem?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 12, 2007 5:39 pm 
Offline

Joined: Mon May 29, 2006 7:07 pm
Posts: 287
Location: Denver
go to A2Billing_UI/paypal/ipn_res and find line that says

if ($id>0){
$mycur = $currencies_list[strtoupper($mc_currency)][2];
$addcredit = ($mc_gross-$mc_fee) / $mycur;

just change it to:

if ($id>0){
$mycur = $currencies_list[strtoupper($mc_currency)][2];
$addcredit = $mc_gross / $mycur;

Save it, that should take care of it.


Top
 Profile  
 
 Post subject: Thanks.
PostPosted: Fri Jan 12, 2007 7:08 pm 
Offline

Joined: Fri Dec 22, 2006 2:43 pm
Posts: 76
Location: London, UK
That works, thanks alot mate.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 12, 2007 10:37 pm 
Offline
Moderator
User avatar

Joined: Tue Jun 06, 2006 12:14 pm
Posts: 685
Location: florida
Yes, I think many of us think that is how it should be. Maybe Areski puts that in the a2billing.conf file under paypal with something like "PayPal_Fees = Yes or No" - someone should place that hack code with this idea under requests 8)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 05, 2007 7:44 pm 
Offline

Joined: Fri Apr 28, 2006 5:11 am
Posts: 426
But Paypal should be charge the fees automaticaly!
In example, when you shopping, you see price for stuff, but when you paid - it is little different in end, right? but who's care? ;)
customer agree to pay taxes and fees anyway. and he concentrate more on price, than on total.i think it will more correctly way to let to paypal get his fees on payment stage and i was asking before for release this...
for example: customer want pay $10 to us. paypal will give Total ($10 + tax) for example $11.52. customer will pay. paypal will take his 1.52 and we will receive $10.00 as customer was want. every party is happy, end of story. :mobile:
i think what this is only one right way to go. any ideas, how to release that?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 06, 2007 4:29 am 
Offline
Moderator
User avatar

Joined: Tue Jun 06, 2006 12:14 pm
Posts: 685
Location: florida
sorry buddy, I kindly disagree with you. When you pay with a credit card, the merchant pays the credit card processing company a fee (like 3%) that does not get passed on to the buyer. But I guess its up to your model. To me when I buy something at the store, they charge me the same if I pay with CC or cash. (then again if I was doing wholesale ... then I guess maybe you would expect to pay extra for CC processing)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 06, 2007 10:08 am 
Offline

Joined: Fri Apr 28, 2006 5:11 am
Posts: 426
krzykat wrote:
When you pay with a credit card, the merchant pays the credit card processing company a fee (like 3%) that does not get passed on to the buyer.

Really?? :shock: I think this already included in your Total :wink: just you dont need to know about this... :twisted:
Anyway...
but my customers (not me!) was requesting me about to do this... so, i think now this is very needed feature. customers dont want think too match about type of transaction or some else. they want just put his money in my account as simple and fast as possible and exactly amount what he's was choose. and they agree to pay any taxes as little extra. i personaly agree with this model.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 06, 2007 11:37 am 
Offline

Joined: Thu Aug 10, 2006 10:47 pm
Posts: 145
Location: LA,CA,USA
Hey krzykat....as per:

Quote:
Yes, I think many of us think that is how it should be. Maybe Areski puts that in the a2billing.conf file under paypal with something like "PayPal_Fees = Yes or No" - someone should place that hack code with this idea under requests Cool


I could do it, i would do it, and i would share it.....but what exactly were you wanting? Create another thread in Requests though :D


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 06, 2007 10:29 pm 
Offline
Moderator
User avatar

Joined: Tue Jun 06, 2006 12:14 pm
Posts: 685
Location: florida
You're on ... I'll make a request ;)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 08, 2007 1:12 am 
Offline

Joined: Thu Aug 10, 2006 10:47 pm
Posts: 145
Location: LA,CA,USA
Ok all done...i'll be posting the fix/instructions later today....wasn't terribly difficult to add this....well once you know how areski programmed this thing.... :P

FIX

/etc/asterisk/a2billing.conf

Change Line 202
Code:
; paypal log file, to log the transactions & errors
paypal_logfile=/tmp/a2billing_paypal.log


TO

Code:
;Deduct Paypal Fee's from amount, or not, default YES
paypal_fees=yes

; paypal log file, to log the transactions & errors
paypal_logfile=/tmp/a2billing_paypal.log


../lib/asterisk/agi-bin/libs_a2billing/Class.A2billing.php

Change Line 277
Code:
      if(!isset($this->config["paypal"]['purchase_amount']))   $this->config["paypal"]['purchase_amount'] = '5;10;15';
      if(!isset($this->config["paypal"]['paypal_logfile']))   $this->config["paypal"]['paypal_logfile'] = '/tmp/a2billing_paypal.log';


TO

Code:
      if(!isset($this->config["paypal"]['purchase_amount']))   $this->config["paypal"]['purchase_amount'] = '5;10;15';
      if(!isset($this->config["paypal"]['paypal_fees']))   $this->config["paypal"]['paypal_fees'] = '1';
      if(!isset($this->config["paypal"]['paypal_logfile']))   $this->config["paypal"]['paypal_logfile'] = '/tmp/a2billing_paypal.log';


../a2billing/lib/defines.php

Change Line 66
Code:
   define ("PAYPAL_PURCHASE_AMOUNT", isset($A2B->config["paypal"]['purchase_amount'])?$A2B->config["paypal"]['purchase_amount']:null);
   define ("PAYPAL_LOGFILE", isset($A2B->config["paypal"]['paypal_logfile'])?$A2B->config["paypal"]['paypal_logfile']:null);


TO

Code:
   define ("PAYPAL_PURCHASE_AMOUNT", isset($A2B->config["paypal"]['purchase_amount'])?$A2B->config["paypal"]['purchase_amount']:null);
   define ("PAYPAL_FEES", isset($A2B->config["paypal"]['paypal_fees'])?$A2B->config["paypal"]['paypal_fees']:null);
   define ("PAYPAL_LOGFILE", isset($A2B->config["paypal"]['paypal_logfile'])?$A2B->config["paypal"]['paypal_logfile']:null);


../a2billing/paypal/ipn_res.php

Change Line 112
Code:
                  $paypal_ipn->error_out("PAYPAL_FEES == 0", $em_headers);
                  $addcredit = ($mc_gross-$mc_fee) / $mycur;


TO

Code:
               if (PAYPAL_FEES == 1)
               {
                  $paypal_ipn->error_out("PAYPAL_FEES == 1", $em_headers);
                  $addcredit = ($mc_gross) / $mycur;
               }
               else
               {
                  $paypal_ipn->error_out("PAYPAL_FEES == 0", $em_headers);
                  $addcredit = ($mc_gross-$mc_fee) / $mycur;
               }


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 16, 2007 12:16 am 
Offline

Joined: Thu May 04, 2006 6:14 am
Posts: 76
Location: Manta - Ecuador
Great post ... thank you ! :P


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 19, 2007 4:26 pm 
Offline

Joined: Thu Feb 15, 2007 9:35 pm
Posts: 60
I was able to follow the steps up until this section and I could not find the parameter PAYPAL_FEES any where ?! . is there another updated ipn_res.php file that I need to download ?. Thanks for helping.

Quote:
../a2billing/paypal/ipn_res.php

Change Line 112
Code:
                  $paypal_ipn->error_out("PAYPAL_FEES == 0", $em_headers);
                  $addcredit = ($mc_gross-$mc_fee) / $mycur;


TO

Code:
               if (PAYPAL_FEES == 1)
               {
                  $paypal_ipn->error_out("PAYPAL_FEES == 1", $em_headers);
                  $addcredit = ($mc_gross) / $mycur;
               }
               else
               {
                  $paypal_ipn->error_out("PAYPAL_FEES == 0", $em_headers);
                  $addcredit = ($mc_gross-$mc_fee) / $mycur;
               }


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 20, 2007 12:17 am 
Offline

Joined: Sun Jun 25, 2006 9:13 am
Posts: 183
Location: Germany
Check ./a2billing/lib/defines.php Modification


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 14, 2007 2:53 am 
Offline

Joined: Sat Apr 07, 2007 6:24 pm
Posts: 10
Location: Western Australia
i searched the whole file system and rthere is no Class.A2billing.php


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 14, 2007 5:35 am 
Offline

Joined: Thu May 04, 2006 6:14 am
Posts: 76
Location: Manta - Ecuador
Check the asterisk agi-bin path:

/usr/lib/asterisk/agi-bin/libs_a2billing/Class.A2billing.php


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Predictive Dialer


All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group