Support

Home Forums Event Espresso Premium Manual payment status change always yields "Pending"

Manual payment status change always yields "Pending"

Posted: December 30, 2013 at 4:55 am

Viewing 9 reply threads


Hannes Schnitzer

    December 30, 2013 at 4:55 am

    Hi,

    we are only accepting payments through bank transfer for our event. Thus payment status has to be changed manually. On the Thank You page I we want to display different messages and options depending on the payment status.

    I noticed that the variable $payment_status === “Pending” when it should not. Here are the values I get, based on the payment status setting in the admin panel:

    Completed –> Completed (Correct)
    Pending –> Pending (Correct)
    Incomplete –> Pending (Correct, I guess?)
    Payment Declined –> Pending (Wrong)
    Cancelled –> Pending (Wrong)
    Overpaid –> Refund (Correct)

    It seems to me that payment declined and cancelled should yield different values.
    Am I doing something wrong?
    Thanks.

    WP 3.8
    EE 3.1.36.1.P
    New installation, registration page not yet online


    Dean

    • Support Staff

    December 30, 2013 at 5:39 am

    Hi Hannes,

    I’m not entirely sure what you are trying to achieve here, as in where you are getting the data from, but when I tested changing attendee status’ via the admin area, the database updates correctly http://d.pr/i/8GRn


    Hannes Schnitzer

      December 30, 2013 at 6:27 am

      Thanks Dean,

      in payment_overview.php there is a switch statement: switch( $payment_status ). I am trying to query this $payment_status variable in order to show different messages (different HTML chunks) to the user. But as stated above, the variable equals “Pending” when the actual status is declined or cancelled.


      Sidney Harrell

      • Support Staff

      December 30, 2013 at 4:50 pm

      It appears to be working when I test it:
      http://eetesting.info/EE_branch/?page_id=5&r_id=6-52c1ee3a75d5c
      Maybe do a print_r($payment_status) before the switch statement to check. Can you take a look at the payment status stored in the DB when you update the attendee in the admin?


      Hannes Schnitzer

        January 2, 2014 at 5:16 am

        The print_r($payment_status) came before the switch statement already.

        Checking the database I found that while the wp admin interface shows a declined payment correctly, the database doesn’t get updated correctly and still shows “pending”.


        Sidney Harrell

        • Support Staff

        January 2, 2014 at 12:48 pm

        Are you doing this on a primary attendee or an additional attendee?


        Hannes Schnitzer

          January 3, 2014 at 2:16 am

          On a primary attendee.


          Sidney Harrell

          • Support Staff

          January 3, 2014 at 1:23 pm

          It should be running the database update in includes/admin-reports/enter_attendee_payments.php on line 114. You are not getting the error message from line 117?


          Sidney Harrell

          • Support Staff

          January 6, 2014 at 3:09 pm

          I just tested it in the admin on your site, and it’s working correctly. I’m looking at attendee #197, changed payment status to ‘Payment Declined’ and hit ‘update payment’ button. Reloaded the attendee in the DB, and payment status changed to ‘Payment Declined’. Changed payment status in the admin back to ‘Incomplete’, hit ‘update payment’ button, reloaded the attendee in the DB, and payment status was changed back to ‘Incomplete’.


          Hannes Schnitzer

            January 8, 2014 at 7:29 am

            Sorry, my bad. When testing, I reloaded the thank you page which is shown after registration. I didn’t realize that the form got resubmitted each time, resetting the payment status.

            Viewing 9 reply threads

            The support post ‘Manual payment status change always yields "Pending"’ is closed to new replies.

            Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

            Event Espresso - Staging Server