Paypal Express Issue

Hey guys, I'm having a very frustrating problem integrating PayPal Express with my site. I have set up with PayPal Sandbox, and have double checked to make sure I am using sandbox credentials. Here's what happens...

The customer can click on checkout, then they enter their shipping info, then they are taken to PayPal and enter their credit card info, then they return to my website to make the final payment, this is when things get interesting...they click on the "Confirm Payment" button, and then I get the following messages:

-There was a problem connecting to PayPal. Please try again.
-There was a problem finalizing your purchase with PayPal. Please go back and try again.
-Whoops, looks like you skipped a step! Please go back and try again

I initially thought this was a problem with PayPal. However, I checked my Sandbox PayPal account for the test seller, and the 'payments' had come through, meaning PayPal has successfully charged the customer. I've tried disabling my other plugins, but they don't seem to have any effect on the outcome.

I wanted to know if I'm just doing something wrong with some setting or another. Thanks in advance!

  • Mason
    • DEV MAN’s Sidekick

    Hiya,

    Is there anything listed in your PayPal IPN History? May provide a clue. Also, do you have any other plugins enabled on your site? Some other plugins are known to interfere with the process of going back and forth from PayPal's site.

    Let us know.

    Thanks!

  • ghmaster
    • Design Lord, Child of Thor

    Hey mason,
    Thanks for the quick response. I have tried disabling the other plugins on my site and it still produces the same behavior.

    With Paypal, I'm using their sandbox (along with sandbox credentials) and the simulated emails indicate payment notifications and the corresponding transaction amount is credited to the seller's account.

    However, after taking a look, I notice that Instant Payment Notification is disabled, and when I enable it, it's asking for the notification url. What url am I suppose to provide here?

  • ghmaster
    • Design Lord, Child of Thor

    Just wanted to share what I've found so far...
    I did access IPN history, and it appears to be fine. The transactions successfully go to through to PayPal. However, the orders are not registering in MarketPress. I've done close to 10 transactions using the PayPal sandbox, and they all credit the proper amount, but don't show up as orders in marketpress. Any ideas?

  • Mason
    • DEV MAN’s Sidekick

    Hiya,

    Can you copy/paste what's in your IPN history? That'll be the most helpful. I'll also ask Aaron if he has any idea on why it wouldn't show up in MarketPress.

    I'll also just mention that sometimes PayPal's sandbox just messes up. It's one of the most frustrating development environments.. like ever. Anyway, we definitely want to see this working for ya and will have some more ideas soon.

    Thanks!

  • ghmaster
    • Design Lord, Child of Thor

    Hey Mason,
    Thanks for responding on the weekend. Here is IPN history

    To send an IPN again to a profile URL, check a selection here, and then click the Resend Selected button.

    History Transaction Table Date/time created Message ID Status Transaction ID
    7/16/2011 01:17 PDT 07H027785W073400C Sent 82A00988ME831410T
    7/16/2011 01:06 PDT 3P231679DJ7991504 Sent 39Y677675S983082R
    7/16/2011 00:59 PDT 67D51587RB1000433 Sent 4HY91455CH7830500
    7/16/2011 00:58 PDT 96K49221T5437544W Sent 0AM1330532322821H
    7/16/2011 00:54 PDT 0FH483087D507491K Sent 54B19038C9505743Y

    and here is the details of the first entry...

    Instant Payment Notification (IPN) details
    Message ID07H027785W073400C
    Date/time created7/16/2011 01:17 PDT
    Original/ResentOriginal
    Latest delivery attempt date/time7/16/2011 01:17 PDT
    Notification URLhttp://aphroditemars.com/store/payment-return/paypal-express
    HTTP response code
    What's this?200
    Delivery statusSent
    No. of retries0
    Transaction ID82A00988ME831410T
    IPN typeTransaction made
    IPN Message
    mc_gross=149.95&invoice=896d81a77e18&protection_eligibility=Eligible&address_status=confirmed&payer_id=M536HPQQBNUCU&tax=0.00&address_street=47 Cape Cod&payment_date=01:17:51 Jul 16, 2011 PDT&payment_status=Completed&charset=windows-1252&address_zip=92620&first_name=Henry&mc_fee=4.65&address_country_code=US&address_name=Henry McCody&notify_version=3.1&custom=&payer_status=unverified&address_country=United States&address_city=Irvine&quantity=1&verify_sign=A8Idv1X4VTADo-sVscgZzmbPEM0VA2zt40KQ9dYIM3x9xSlvtMbSPHZ4&payer_email=buyer_1310802214_per@yahoo.com&contact_phone=8219565&txn_id=82A00988ME831410T&payment_type=instant&last_name=McCody&address_state=CA&receiver_email=selerx_1310802370_biz@yahoo.com&payment_fee=4.65&receiver_id=EVGYCF5LEGEE4&txn_type=express_checkout&item_name=AphroditeMars Store Purchase - Order ID: 896d81a77e18&mc_currency=USD&item_number=&residence_country=US&test_ipn=1&receipt_id=5076-9651-3287-4050&handling_amount=0.00&transaction_subject=&payment_gross=149.95&shipping=0.00&ipn_track_id=1rUlUQk.d2HCYI1UvS9EZA

    when clicking on the transaction ID:
    Express Checkout Payment Received (Unique Transaction ID #82A00988ME831410T)

    --------------------------------------------------------------------------------

    Name:
    Henry McCody (The sender of this payment is Unregistered)
    Email:
    buyer_1310802214_per@yahoo.com
    Payment Sent to:

    selerx_1310802370_biz@yahoo.com

    --------------------------------------------------------------------------------

    Total amount:
    $149.95 USD
    Fee amount:
    -$4.65 USD
    Net amount:
    $145.30 USD

    Issue a refund

    You have up to 60 days to refund the payment.

    --------------------------------------------------------------------------------

    Item amount:
    $149.95 USD
    Sales Tax:
    $0.00 USD
    Shipping:
    $0.00 USD
    Handling:
    $0.00 USD
    Quantity:
    1

    --------------------------------------------------------------------------------

    Order Description:
    AphroditeMars Store Purchase - Order ID: 896d81a77e18
    Invoice ID:
    896d81a77e18
    Date:
    Jul 16, 2011
    Time:
    01:17:51 PDT
    Status:
    Completed

    --------------------------------------------------------------------------------

    Payment Type:
    Instant

    Hope this helps. Thanks again!

  • ghmaster
    • Design Lord, Child of Thor

    Hey Mason, just wanted to say thanks for the support in the last couple of days. I think I may have found the problem...

    I traced the issue to a the paypal-express.php file. I found that the variable $response in the function api_call() (~Line 1095) was showing up as a timeout error. I added the line to the args array... $args['timeout'] = 10000;

    Now the response time for PayPal is 10 seconds instead of the default 5 seconds (when I counted it seems to take around 6 seconds, give or take).

    For whatever reason when MP tried to POST the required data, it was timing out, as PayPal seemed to take its time.

    I tried this and it seemed to start working...the errors went away and the orders began to show up in the "Manage Orders" section. I'm cautiously optimistic :slight_smile: Once again thanks for the help!

  • Mason
    • DEV MAN’s Sidekick

    Wow, super find ghmaster. I'm impressed!

    I'll also note this to the developer and store it in the back of my head for future reference :slight_smile:

    I'm gonna mark this one resolved for now, but feel free to re-open if something comes up again. We'll be here!

  • rweiss
    • WPMU DEV Initiate

    I just tried a sandbox payment and got the exact same responses as ghmaster. This is a more recent Marketpress and the line has obviously been changed (since a search doesn't locate it), but the error is still taking place.

    Any other ideas what may be causing it?

  • rweiss
    • WPMU DEV Initiate

    That is what I was looking to do - but the code line in this discussion doesn't seem to exist any more - so I assumed that it had been changed. Is it on a different page, or does my Coda simply not find things like it should?

  • rweiss
    • WPMU DEV Initiate

    Is it in this line:

    if (is_wp_error($response) || wp_remote_retrieve_response_code($response) != 200)

    I am not seeing the line referred to above: $args['timeout'] = 10000; anywhere. The file I am looking at is paypal-express.php

    Rick

  • ratschi
    • Design Lord, Child of Thor

    Dear all,

    I have the same issue as described above. I changed in the file paypal-express.php the line $args['timeout'] = 60; from 60 to 10000. But it is not working. Pls have a look at my screenshot.

    thank you very much

  • ratschi
    • Design Lord, Child of Thor

    I tried as well adding the line and keeping the original line - but still it is not working. What can I do ?

    My first customer is already disappointed...

    */
    function api_call($methodName, $nvpStr) {
    global $mp;

    //NVPRequest for submitting to server
    $query_string = "METHOD=" . urlencode($methodName) . "&VERSION=" . urlencode($this->version) . "&PWD=" . urlencode($this->API_Password) . "&USER=" . urlencode($this->API_Username) . "&SIGNATURE=" . urlencode($this->API_Signature) . $nvpStr;
    //build args
    $args['user-agent'] = "MarketPress/{$mp->version}: https://premium.wpmudev.org/project/e-commerce | PayPal Express Plugin/{$mp->version}";
    $args['body'] = $query_string;
    $args['sslverify'] = false;
    $args['timeout'] = 60;
    $args['timeout'] = 10000;

  • Timothy
    • Chief Pigeon

    I didn't see your IPN logs or any debug information?

    Here are some links regarding that 10486 error in your screenshot:

    http://answercenter.ebay.com/question/Technical-Issues/Paypal-Error-Code/1000316875

    https://developer.paypal.com/webapps/developer/docs/classic/express-checkout/ht_ec_fundingfailure10486/

    An error code and funding failure recovery process is available for DoExpressCheckout. This error code notifies merchants when a buyer's payment failed due to a bad funding method (typically an invalid or maxed out credit card)

    Seem to be card and/or funding related according to Paypal.

    To save confusion with what has been tried or advised here a year ago, please create a new thread your IPN logs and answers to any other questions asked here.

    This will ensure the issues don't get confused and that we don't miss your responses on an old thread.

    Cheers.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.