By Jérôme on Thursday, 02 May 2019
Posted in General Issues
Replies 10
Likes 0
Views 894
Votes 0
Hi,

In the backend, in "Orders"->"Subscriptions" if you click on the green "New" button, the following error appears:
"0 Error decoding JSON data: Control character error, possibly incorrectly encoded "
Please see attached for detailed error.

Kind Regards,

Jerome
Hello Jérôme ,

Can you please provide us your FTP access so we can have a look.

Also, allow me to access global configuration, i need to enabled debug mode and error reporting to maximum to debug this issue further.
please update us.
·
Friday, 03 May 2019 14:58
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Karanveer,

You are already a SuperAdmin user, so you can access the Global Config.

Unfortunately, we do not have an FTP access.

Kind Regards,
·
Friday, 03 May 2019 15:29
·
0 Likes
·
0 Votes
·
0 Comments
·
In case, please find attached the error detailed:
·
Friday, 03 May 2019 15:46
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Jeorme,

Yes, i am able to enable debug mode now. I checked and found that when new subscription page is opened then somehow data is not encoded correctly. To debug this issue further we need FTP Details.

Is it possible for you to create FTP details or can share Cpanel access, so we will be able to debug this issue further.
Update us with response.

Thank you for understanding !
·
Friday, 03 May 2019 18:00
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

Unfortunately we cannot deploy a FTP.

I have tried to fix it myself. The problem is coming from the json format of the transactions, the "params" is not formated properly. It work if you remove the double quote, but without the double quote it causes an issue in case it is empty . This is a transaction example:

{"664":{"transaction_id":"664","user_id":"1026","invoice_id":"1036","current_invoice_id":"0","payment_id":"79","gateway_txn_id":"0","gateway_parent_txn":"0","gateway_subscr_id":"0","amount":"0.00000","reference":"","message":"COM_PAYPLANS_TRANSACTION_CREATED_FOR_WALLET_RECHARGE","created_date":"2014-06-26 14:09:27","params":"{"option":"com_payplans","gateway":"paypal","view":"payment","task":"notify","mc_gross":"3.00","invoice":"8O56WJCMA63O","protection_eligibility":"Eligible","address_status":"unconfirmed","payer_id":"CFMSU3452CG7KQ345WQ","tax":"0.00","address_street":"","payment_date":"07:23:41 May 13, 2015 PDT","payment_status":"Completed","charset":"windows-1252","address_zip":"","first_name":"ti45hfggfhwuk","mc_fee":"0.50","address_country_code":"ID","address_name":"","notify_version":"3.8","custom":"","payer_status":"verified","business":"xxx@xxx.com","address_country":"","address_city":"","quantity":"1","verify_sign":"A11hCuW2jv0cvfdhfgdfgaoyfsUIz4shGj31AzR37E5x5p6Rkynl5z6ysU54WeZC","payer_email":"xxx@gmail.com","contact_phone":"","txn_id":"8932475239529NH755234630N","payment_type":"instant","last_name":"abcd","address_state":"","receiver_email":"xxx@xxx.com","payment_fee":"","receiver_id":"B6F6GXSJE3XHY8YG","txn_type":"web_accept","item_name":"","mc_currency":"EUR","item_number":"8O56WJFHDJMQ0H0","residence_country":"ID","handling_amount":"0.00","transaction_subject":"","payment_gross":"","shipping":"0.00","ipn_track_id":"814fdhghdfghg3c2btrzrcaf7db","Itemid":null,"payment_key":"8O562543WJCMFSFA63O"}"}}

So you have to properly format the "params" that is a json string.

On my side I fixed the issue by amending the file \administrator\components\com_payplans\views\subscription\view.html.php line 113

from:

// Transactions
$invoiceModel = PP::model('Invoice');
$transactions = $invoiceModel->getTransactions($invoices);

to:

// Transactions
if ($id) {
$invoiceModel = PP::model('Invoice');
$transactions = $invoiceModel->getTransactions($invoices);
}

In my opinion, we do not need the transactions list in case of a "New subscription" form, but I can be wrong.

Please keep me updated.

Kind Regards,

Jerome
·
Saturday, 04 May 2019 15:39
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Jerome,

Thank you for updating on this. The fix you applied seems fine.
But, we are unable to replicate this issue at local, that's why ftp needed to debug this further what causing the issue.

In my opinion, we do not need the transactions list in case of a "New subscription" form, but I can be wrong.
Thank you for your suggestion, i'll update development team about this and we will look into this.

Thank you for understanding !
·
Monday, 06 May 2019 11:49
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Karanveer,

I realised that I have a lot of issue like that due to old Skrills subscriptions. For instance, the cron was not working anymore neither which has been a big problem since the subscription renew of Stripe was not done anymore... The old Skrill subscriptions was not linked to any AppID anymore after to update to version 4. When I migrated to the last PayPlans version from 3 to 4. I had to create a new app for Skrill payment gateway. I solved the issues by assignig the old skrill subscription payment to the new Skrill AppID in the table "payplans_payment".

This has to be fix in your migration process from 3 to 4 for people having Skrill subscriptions.

I am not sure that my message is clear, if not, please just ask.

Kind Regards,
·
Thursday, 09 May 2019 16:06
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Jerome,

Thank you for reporting this issue. I've log this issue into issue tracker and will include in upcoming release.
It seems you already fixed the issue at your end or still issue persist.

Thank you for understanding !
·
Thursday, 09 May 2019 16:46
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Manisha,

Yes, it has been fix on my side.

Kind Regards,
·
Thursday, 09 May 2019 17:18
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Jerome,

Thank you for updating us on this.
·
Thursday, 09 May 2019 17:45
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post