2CO Working OK Now, But MarketPress Not Generating Order?

Hi again all

Finally got the 2CO end working, but now it seems MarketPress may be having issues (or more likely I'm doing something worng) :slight_smile:

Carried out a 'test' purchase (in fact it was real) on our client's site this morning. We were sent back to the site's 'order complete' message and also received a transaction confirmation email from 2CO, but:

a) No actual order appears to have been generated in MarketPress

b) No order confirmation email from the site was generated (we have configured this message in Settings)

The card transaction went through fine - my other half received a confirmation SMS from her bank as normal.

Any ideas?

Thanks
Philip

  • Jonathan

    @belucid,

    Try and send a demo transaction to your return address to ensure that it is actually working

    I love this developers toolbox and use it to test on my local machine before my hosted site. But works either way.
    http://developers.2checkout.com/inss

    Sidenote: Haven't actually tried it with marketpress, but it works with membership plugin. Worth a shot - shrugs.

    And Aaron is going to ask for your log files / transaction details - were there any 404's etc but I'll leave that for you two to troubleshoot :wink:

  • Jonathan

    @belucid
    I was referring to the ipn return page: The ipn url: The page that 2CO sends the success message to along with the transaction data. The page that marketpress processes the information and adjusts itself accordingly

    Off the top of my head, I think it is

    yourdomain.com/payment-return/2checkout/

    If you type that address, changing your domain name you should get a error message "We were unable to authenticate the request" which means its working, if you get nothing (404) it isn't working.

    That address is the one I suggested you use the ins simulator with to test various scenarios.

    Sorry I can't be more helpful, but gateways really aren't my strong point - lol.

  • belucid

    Jonathan

    I just repeated the process and there was not a single error visible on any of the steps (neither MarketPress, nor 2CO side).

    The url displayed after the payment confirmation is 2CO's https://www.2checkout.com/checkout/purchase probably displaying the client page in a frame

    The one you suggested doesn't seem to work.

    Is there a specific page we must return to after the 2co payment?

    Thanks a lot
    Philip

  • Jonathan

    I just repeated the process and there was not a single error visible on any of the steps (neither MarketPress, nor 2CO side).

    So it worked? The purchase recorded in marketpress? Case Closed?

    - - - - - - -
    I'm sorry, just checked the ipn url i gave you - (Instant Payment Notification URL) and it was wrong - told you off the top of my head - anyways I forgot to add the slug store stuff

    So it should be
    domain.com/store/payment-return/paypal-express/
    domain.com/store/payment-return/2checkout/

    Senseless Ramblings on how it sort of works:
    This page triggers the process_ipn_return function which does a few checks and issues these messages, based on if something is / isn't there: Basically processes the order.

    (1) Invoice not found
    (2) We were unable to authenticate the request
    (3) Thank you very much for letting us know. REF: Not success
    (4) All clear, and successful "Thank you very much for letting us know" and this triggers the update_order_payment_status (which runs / adds the data to database, moves order from pending to paid etc etc etc)

    So this is where your issue seems to lie.
    Paypal is handling the purchase stuff, money was recieved, your partner got sms to say money went off account - everything perfect except marketpress isn't recording the successful transaction.

    That means your marketpress isn't recieving the ins data which is supposed to come to the above mentioned url.

    Anyways, I'll stop filling up your post with my ramblings - lol and wait for the real experts to step in :wink:

  • belucid

    Jonathan

    No, its not solved, the result is the same - after payment completion we get the mail from 2co, we get redirected back to the site, site says order complete, but then no order seems to be registered in the backend and no email is sent.

    I suspected we've missed a step in the configuration and your last post makes perfect sense.

    I tried to invoke the ../store/payment-return/2checkout/ page expecting, as you mentioned in your earlier post, to get some kind of error. There was nothing.

    However we've decided we'll reconfigure 2CO to land on that page after payment completion. Lets see how it goes. Hope that solves it - we'll post back here in short while.

    Thanks a lot
    Philip

  • Jonathan

    @belucid,

    Woot! That's great news... and you're most welcome (though I really didn't do much, just looked at the source code). You are the one who had to do the hard stuff: Testing.

    As for

    Is this a known issue?

    I can't really say as my testing never really got that far, I was still trying to add additional functionality to the plugin, then that got stalled - shrugs.
    Perhaps @Phil will be better able to answer you there.

    Anyways, glad to hear that you at least got them talking to one another - that is a positive step in the right direction.

  • Jonathan

    @Aaron, or @Phil, or any WPMUDEV Staff :wink:

    Code Changes For 2Checkout Gateway Please:
    marketpress/marketpress-includes/plugins-gateways/2checkout.php
    End Function: function process_ipn_return
    Around Line 395:

    exit(0);
    				}
          }
        }
      }
    }

    To change to

    exit(0);
    				}
          }
    
        } else {
    			// Did not find expected POST variables. Possible access attempt from a non 2Checkout site.
    			header('Status: 404 Not Found');
    			echo 'Error: Missing POST variables. Identification is not possible.';
    			exit;
      }
     }
    }

    Basically so that if we hit the url it at least gives us some indication that it is actually working, albeit we are missing post variables :wink:

    @belucid,

    From above ramblings, I figured out why you couldn't see if the ipn url was working.
    New topic is a good idea for new issue :wink:
    All the best,
    Jonathan

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.