Author Topic: Error while in payment page  (Read 433 times)

0 Members and 1 Guest are viewing this topic.

Offline suwandichen13

  • Full Member
  • ***
  • Posts: 154
    • View Profile
    • BlogHints.com
Error while in payment page
« on: 03 April 2017, 07:30:47 PM »
In link payment page and press the pay button but error!!

Error Message :
Code: [Select]
An error occured while saving the link payment data.

how to fix it?
is there anyone ever experience this?

Offline bruleoadmin

  • Owner / Admin / Support
  • Administrator
  • Hero Member
  • *****
  • Posts: 1992
    • Skype - torquepoint
    • View Profile
    • Bruleo
Re: Error while in payment page
« Reply #1 on: 03 April 2017, 08:56:48 PM »
It could be a lot of things.

1) Corrupt database tables.
2) Fields being saved not matching the tables in the database.
3) Depreciated code.

Probably #2

Easiest way to identify the error would be to edit the code so that the saved data is displayed on the screen [using print_array($arrayname) which you'll find in payment.php] and then run a test submit. Compare the data to the fields in the database and that should give you an idea where the error is occurring.

Bruce

Offline suwandichen13

  • Full Member
  • ***
  • Posts: 154
    • View Profile
    • BlogHints.com
Re: Error while in payment page
« Reply #2 on: 04 April 2017, 07:41:08 PM »
Hi, thanks for your help and information.

Regarding option no 2, i couldn't find
Code: [Select]
print_array($arrayname)

inside payment.php

Offline bruleoadmin

  • Owner / Admin / Support
  • Administrator
  • Hero Member
  • *****
  • Posts: 1992
    • Skype - torquepoint
    • View Profile
    • Bruleo
Re: Error while in payment page
« Reply #3 on: 04 April 2017, 08:27:10 PM »
Not literally '$arrayname'!!!   ???

'$arrayname' will be whatever the main data array name is called in payment.php. I can't recall without looking and I'm too busy to go digging around in my files, but you should be able to find it by looking at your own files..... it's probably something like $paymentdata or $pay_data.  Just add the prnt_array in the file after the last data variable has been assigned and it should output to your screen when you run the process.

Bruce

Offline suwandichen13

  • Full Member
  • ***
  • Posts: 154
    • View Profile
    • BlogHints.com
Re: Error while in payment page
« Reply #4 on: 05 April 2017, 07:54:34 AM »
here the results :

Array
(
    [ID] => 203
    [LINK_ID] => 1559
    [IPADDRESS] => 180.241.25.56
    [QUANTITY] => 1
    [COUPON_USED] =>
    [COUPON_DISCOUNT] =>
    [AMOUNT] => 29.95
    [TOTAL] => 29.95
    [UM] => 5
    [PAY_DATE] => 2017-04-05 04:53:35
    [CONFIRMED] => -1
    [SUBSCRIBED] => 0
)

and i totally do not understand.

Offline suwandichen13

  • Full Member
  • ***
  • Posts: 154
    • View Profile
    • BlogHints.com
Re: Error while in payment page
« Reply #5 on: 05 April 2017, 08:00:31 AM »
here the results for: https://www.bloghints.com/payment.php?id=1559  (house of anansi)

Array
(
    [ID] => 203
    [LINK_ID] => 1559
    [IPADDRESS] => 180.241.25.56
    [QUANTITY] => 1
    [COUPON_USED] =>
    [COUPON_DISCOUNT] =>
    [AMOUNT] => 29.95
    [TOTAL] => 29.95
    [UM] => 5
    [PAY_DATE] => 2017-04-05 04:53:35
    [CONFIRMED] => -1
    [SUBSCRIBED] => 0
)

and i notice on admin area link payment : /admin/conf_payment.php?r=1
there no log for Link id :1559 , payed or not

Offline bruleoadmin

  • Owner / Admin / Support
  • Administrator
  • Hero Member
  • *****
  • Posts: 1992
    • Skype - torquepoint
    • View Profile
    • Bruleo
Re: Error while in payment page
« Reply #6 on: 05 April 2017, 08:10:12 AM »
Those are the names of the fields in your PLD_PAYMENT table that are having data saved to them when the payment process runs.  You should therefore check that all those fields exist.  If any are missing, then that is why the process is failing.  If they do exist, check that the table is not corrupted and run a fix from phpmyadmin of necessary.

And of course, if the payment fails at the database write stage, then how is anything going to be able to write to provide you a log in admin??!

Bruce

Offline suwandichen13

  • Full Member
  • ***
  • Posts: 154
    • View Profile
    • BlogHints.com
Re: Error while in payment page
« Reply #7 on: 05 April 2017, 08:36:05 AM »
1. I going to PHPmyAdmin and checking "PLD Payment" table is present including the data from the last item ID 1452.
2. I Preform checking the Database via MySQL databas and all table is "OK" and nothing error.

hmm.


Offline suwandichen13

  • Full Member
  • ***
  • Posts: 154
    • View Profile
    • BlogHints.com
Re: Error while in payment page
« Reply #8 on: 09 April 2017, 06:54:20 AM »
Problem: can't saving data to database while on link payment page.
Status: Solved
Cause: after moving to USA server, the default settings on USA servers are not same with Europe database, so i asking my Hosting to settings my USA Server same like my last Europe Server, so now the problem is Solved.

Special thanks to Bruce, by spending lot times to help me to identify it and tell me the reasons of the Problem.

Regard

Offline bruleoadmin

  • Owner / Admin / Support
  • Administrator
  • Hero Member
  • *****
  • Posts: 1992
    • Skype - torquepoint
    • View Profile
    • Bruleo
Re: Error while in payment page
« Reply #9 on: 09 April 2017, 01:34:37 PM »
I am glad that the problem was resolved in the end. 

For reference, to any other users reading this : It appears this was due to some server settings preventing data being saved to the database, specifically from the phpLD payment process.  On investigation, it was found that all coding in the installation files was correct and the data generated was correct, but would not save to the database table, which was also formatted correctly and in the correct state. By a process of elimination, it was then decided that the error could only be caused by either other non-standard scripts that were installed, clashing with the process or the hosting / server settings preventing certain data being transmitted to the database.

My suspicion is that the server was running a higher PHP version than the script was designed for; perhaps PHP 6, although this is unconfirmed.

Please note that I do have instructions on how to upgrade PHPLD scripts for use on PHP versions up to an including PHP 5.6, but anything beyond that is untested.  For PHP6, there have been a lot of changes and some further code the the phpld script uses will likely become depreciated. Therefore, as the most recent version of phpLD is at least 4 years old, I expect they will have problems running on PHP6 and beyond. 

Thanks to  suwandichen13 for the donation in return for the time spent. It is much appreciated.

Bruce.




Tags:
 

SPONSORS