View Full Version : Pay-As-You-Go Credits plugin shows incorrect Required Amount (bug)

December 25, 2012, 08:58 AM
As you can see on snapshot; the Required Amount is the same as available balance.

Also, when you trying to pay an Invoice using Credits; it return an error as following: The 'rlInvoices' class not found

December 26, 2012, 03:31 AM

You can fix it the following way:

- open file: plugins/payAsYouGoCredits/gateway.tpl
- find this code:

var price_item = parseFloat({if !empty($invoice_info)}{$invoice_info.Total}{else}{ $plan_info.Price}{/if});

and change it to:

var price_item = parseFloat({if !empty($invoice_info)}{$invoice_info.Total}{elseif $pack_info.Price}{$pack_info.Price}{else}{$plan_in fo.Price}{/if});

- open file: includes/controllers/payment.inc.php
- check this line:

$callback_plugin = $payment['callback']['plugin'];

- if haven't found it that you should add this code after line 19

December 26, 2012, 05:52 AM
Works! Thank you.

Anjana Hemachandra
January 15, 2014, 05:23 AM
I did exactly as Vladimir told But it is not working.
I found the line - $callback_plugin = $payment['callback']['plugin']; in line 36 not after line 19.
please help.

January 26, 2014, 11:24 PM
The line number may be different; however, try to play around with that, since its worked or me.

Stanimira Pavlova
March 29, 2014, 12:04 PM
I have the same problem but that didn't helped me (what Vladimir posted). What should we do with that line - $callback_plugin = $payment['callback']['plugin']; ?
And my credit amount is the same as the sufficient credit amount. Please help!