+ Reply to Thread
Results 1 to 5 of 5

Thread: ClickBank IPN transactions - with 1 click upsell - weirdness inside

  1. #1

    Exclamation ClickBank IPN transactions - with 1 click upsell - weirdness inside

    Ok,

    This one is driving me up the wall.

    I've got a product on clickbank, several actually, and they all work fine: Single purchases credit and create new members, members with existing accounts see a record of each subscription payment, and a member can order the same product for access to the site a second time, and it all works no problem.

    That said, I do have an issue:

    When I setup 1click upsell I am getting duplicate member accounts and a single product in each account.

    I thought that this might be due to the fact that ClickBank sends both transaction notification signals through one right after another, so I introduced some custom code to check for the prescense of an "UPSELLFROM" field, and if found delay the script (via sleep) for 30 seconds.

    Same issue.

    I extended the delay to 120 seconds, and verified that the 1st user and purchase were recorded correctly with phpmyadmin before watching the second user get created.

    Ok - so I went as far as to discover that the function call that finds if a user already exists by their email address is returning false, despite there being a user in the db...

    So I went 1 step further, wrote a manual sql query to get the ID of the user, return THAT number and have the script continue.

    That experiment resulted in the correct user receiving two products (yeah!) but when I looked at the product information Memberwing is returning the letter "a" in each field including expiry date, product name etc.



    My hosting environment is a bit unique, we're running FastCGI and NginX, with edge servers and a replicated DB (long story short, we get traffic bursts every day and it's needed.

    What would be the next step in trying to get this nailed down - so far I've had to manually copy the upsell data for each affected member over to their first user and delete the second.

    Happy to pay for a bit of help as well.

  2. #2

    Default

    I just fixed the bug with erratic user metadata.
    Are you running the latest version of Memberwing?

    Gleb

  3. #3

    Default

    No, I'm a bit behind as I've made some modifications to the notify script , if you give me an idea of what/where the change was in the erratic data I can try to apply it myself (if it wasn't an extensive change) otherwise It will be a week or so before I can do the update and re-customize my changes.

  4. #4

    Default

    Ok,

    Worth mentioning you dropped a curly brace on or around line 307/308 which causes the plugin to not install.

    After correcting that - same problems exactly, only it's worse: user items purchased were not saved correctly (admin could not see them).

    I'm going to see if I can adapt the functions I saw you using (maybe_unserialize) and get this going on my end.

  5. #5

    Default

    Turns out it's an issue with overly aggressive caching on a plugin (W3 total cache)

    added this to mwx-notify-clickbank.php as first line and it's all good now:

    Code:
    define('DONOTCACHEDB', true);

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts