virtuozzo / OnApp-WHMCS-UsersModule

MIT License
12 stars 16 forks source link

Error when credit is applied to invoice generated by UsersModule #10

Open istzp opened 9 years ago

istzp commented 9 years ago

Hello, In our whmcs customer has some amount on credit balance. If we try to "apply credit" to invoice generated by UsersModule, we got this error on webpage:

[2015-05-11 12:38:26 346870] [MSG] setTimezone: Do not need to change default date.timezone. [2015-05-11 12:38:26 347069] [MSG] setAPIResource: Set an option for a cURL transfer ( url => "", resource => "version", data_type => "json" append_api_version => , queryString => "" ). [2015-05-11 12:38:26 366445] [MSG] castStringToClass OnApp_Payment: call OnApp_Helper_Caster_JSON::unserialize [2015-05-11 12:38:26 366494] [MSG] Create new Object. [2015-05-11 12:38:26 366534] [MSG] Call OnApp_Helper_Caster_JSON::serialize [2015-05-11 12:38:26 366595] [MSG] setAPIResource: Set an option for a cURL transfer ( url => "", resource => "users/162/payments", data_type => "json" append_api_version => , queryString => "" ). [2015-05-11 12:38:26 366744] [ERROR] castResponseToClass: Can't parse

Although, we saw the error, but credit was applied. Please help us to fix this. Thanks!

ghost commented 9 years ago

Update hooks.php to one from 3.3 branch. https://github.com/OnApp/OnApp-WHMCS-UsersModule/blob/3.3/modules/servers/onappusers/hooks.php

istzp commented 9 years ago

Thank you! Yes, updating wrapper and module to latest release fixed this issue.

ghost commented 9 years ago

@istzp I guess latest release does not include fix mentioned above. Be aware.

istzp commented 9 years ago

Hm.. I will test it on another whmcs instances. On latest whmcs 5.3.13 I don't see this error anymore (at least if I apply credit to invoice from Admin side). But if I try to Apply Credit to invoice when logged as client - I've got redirected to clientarea page without credit applied. But it cold be just whmcs or our custom template issue. I will appreciate if you could test it somewhere on your whmcs installation. Thanks.

update: "redirection issue without credit applied" was related to our custom template.