Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClickBank IPN v6.0 #256

Closed
clavaque opened this issue Jul 20, 2014 · 29 comments
Closed

ClickBank IPN v6.0 #256

clavaque opened this issue Jul 20, 2014 · 29 comments

Comments

@clavaque
Copy link
Contributor

@jaswsinc A user reported getting this warning when setting the IPN URL to v2.1. https://websharks.zendesk.com/agent/#/tickets/3276

@jaswrks jaswrks added this to the Future Release milestone Jul 21, 2014
@jaswrks
Copy link
Contributor

jaswrks commented Jul 21, 2014

Thank you for posting this. I am moving this to the "Future Release" milestone. We will need to run another round of tests against the latest version of ClickBank IPNs and resolve any issues.

@clavaque
Copy link
Contributor Author

Okay.

@jaswrks
Copy link
Contributor

jaswrks commented Jul 27, 2014

Assigning this to myself.

@jaswrks
Copy link
Contributor

jaswrks commented Aug 6, 2014

Referencing: https://support.clickbank.com/entries/22803622-Instant-Notification-Service
Sounds like there is an issue with ClickBank's v6 IPN service. I will have to read further.

@jaswrks
Copy link
Contributor

jaswrks commented Aug 6, 2014

Options currently available to site owners.

2014-08-06_15-19-11

@jaswrks
Copy link
Contributor

jaswrks commented Aug 6, 2014

Version 6 uses a JSON format for the notification. Good, good.

jaswrks pushed a commit to wpsharks/s2member-pro that referenced this issue Aug 6, 2014
jaswrks pushed a commit to wpsharks/s2member-pro that referenced this issue Aug 6, 2014
jaswrks pushed a commit to wpsharks/s2member-pro that referenced this issue Aug 7, 2014
jaswrks pushed a commit to wpsharks/s2member-pro that referenced this issue Aug 7, 2014
@jaswrks
Copy link
Contributor

jaswrks commented Aug 7, 2014

The initial work to integrate with v6 is complete. However, there is more to do. I'm going to place a hold on this for now until I see this document has been updated. They are currently lacking any quality code samples for v6; and the note at the top of this page states they are working on a fix in v6.

2014-08-06_16-03-58

@jaswrks jaswrks added the on hold label Aug 7, 2014
@jaswrks
Copy link
Contributor

jaswrks commented Aug 7, 2014

2014-08-06_17-00-33

@clavaque
Copy link
Contributor Author

clavaque commented Aug 7, 2014

I imagine that s2member_pro_clickbank_notify=1 will default to v2.1, because it'd indicate an older integration, which would have used that version of the IPN, right?

@jaswrks
Copy link
Contributor

jaswrks commented Aug 7, 2014

Correct. Anything that is not 6 uses the old behavior.

  • I will add a note about this when I come back around to this issue.

@clavaque
Copy link
Contributor Author

clavaque commented Aug 7, 2014

Great. :)

@jaswrks
Copy link
Contributor

jaswrks commented Aug 9, 2014

Just checking back in here. This document still shows they are working on v6.

@jaswrks
Copy link
Contributor

jaswrks commented Aug 11, 2014

No change on the ClickBank side of things. This issue will likely get pushed to a future release cycle.

@jaswrks
Copy link
Contributor

jaswrks commented Aug 13, 2014

Just checking back in here. This document still shows they are working on v6.

@jaswrks
Copy link
Contributor

jaswrks commented Aug 13, 2014

Punting this to the next release.

@jaswrks
Copy link
Contributor

jaswrks commented Sep 4, 2014

Article shows no further updates. I just sent ClickBank an email to inquire about the status of v6.

@jaswrks
Copy link
Contributor

jaswrks commented Sep 4, 2014

@jaswrks jaswrks removed this from the v140909 milestone Sep 9, 2014
@clavaque
Copy link
Contributor Author

@jaswrks
Copy link
Contributor

jaswrks commented Sep 21, 2014

Great, thanks for the heads up!

@jaswrks jaswrks modified the milestones: Next Release, v140921 Release Sep 21, 2014
@clavaque clavaque removed the on hold label Sep 24, 2014
jaswrks pushed a commit to wpsharks/s2member-pro that referenced this issue Oct 1, 2014
@jaswrks
Copy link
Contributor

jaswrks commented Oct 1, 2014

  • Test latest changes in v6 of ClickBank IPN.

@jaswrks
Copy link
Contributor

jaswrks commented Oct 2, 2014

Initial testing shows problems with the decryption routine provided in the examples at ClickBank.

@jaswrks
Copy link
Contributor

jaswrks commented Oct 2, 2014

Referencing the following example data unencrypted successfully via ClickBank's IPN service, in version 6. We'll need to have a closer look at the downloadUrl property here, as it seems to be the only way to pull s2 Vars from the IPN service now. Not exactly an improvement in this regard.

Array
(
    [transactionTime] => 2014-10-01T21:24:59-07:00
    [receipt] => KZF489EM
    [transactionType] => TEST_SALE
    [vendor] => websharks1
    [role] => VENDOR
    [totalAccountAmount] => 62.82
    [paymentMethod] => TEST
    [totalOrderAmount] => 69
    [totalTaxAmount] => 0
    [totalShippingAmount] => 0
    [currency] => USD
    [orderLanguage] => EN
    [lineItems] => Array
        (
            [0] => stdClass Object
                (
                    [itemNo] => 1
                    [productTitle] => s2Member® Pro (Single-Site License)
                    [shippable] => 
                    [recurring] => 
                    [accountAmount] => 62.82
                    [downloadUrl] => http://jason.websharks-inc.net/?s2member_pro_clickbank_return=1&item=1&cbreceipt=KZF489EM&time=1412223899&cbpop=243FA413&cbaffi=0&cname=John+Smith&cemail=jas%2Bjohn%40wsharks.com&ccountry=US&czip=99688&cbskin&s2_invoice=1%3A%3A1+M&s2_p1&s2_p3&s2_desc=Bronze+Member+%2F+description+and+pricing+details+here.&s2_custom=jason.websharks-inc.net&s2_customer_ip=216.137.234.68&s2_referencing=1&_s2member_sig=1412213038-1136695ad558668a2192e464284f5637
                )

        )

    [customer] => stdClass Object
        (
            [shipping] => stdClass Object
                (
                    [firstName] => JOHN
                    [lastName] => SMITH
                    [fullName] => John Smith
                    [email] => jas+john@wsharks.com
                    [address] => stdClass Object
                        (
                            [county] => MATANUSKA SUSITNA
                            [state] => AK
                            [postalCode] => 99688
                            [country] => US
                        )

                )

            [billing] => stdClass Object
                (
                    [firstName] => JOHN
                    [lastName] => SMITH
                    [fullName] => John Smith
                    [email] => jas+john@wsharks.com
                    [address] => stdClass Object
                        (
                            [state] => AK
                            [postalCode] => 99688
                            [country] => US
                        )

                )

        )

    [version] => 6
    [attemptCount] => 1
)

jaswrks pushed a commit to wpsharks/s2member-pro that referenced this issue Oct 2, 2014
jaswrks pushed a commit to wpsharks/s2member-pro that referenced this issue Oct 2, 2014
jaswrks pushed a commit to wpsharks/s2member-pro that referenced this issue Oct 2, 2014
jaswrks pushed a commit to wpsharks/s2member-pro that referenced this issue Oct 2, 2014
jaswrks pushed a commit to wpsharks/s2member-pro that referenced this issue Oct 2, 2014
jaswrks pushed a commit to wpsharks/s2member-pro that referenced this issue Oct 2, 2014
jaswrks pushed a commit to wpsharks/s2member-pro that referenced this issue Oct 2, 2014
@jaswrks
Copy link
Contributor

jaswrks commented Oct 2, 2014

Almost about ready-to-go w/ ClickBank IPN v6. Initial testing looks good so far.

That said, I'm going to leave this open for further testing, because I have one remaining question regarding refunds. I sent a request for additional code samples to ClickBank; waiting to hear back from them before we release this into the wild.

@jaswrks
Copy link
Contributor

jaswrks commented Oct 2, 2014

jaswrks pushed a commit to wpsharks/s2member-pro that referenced this issue Oct 2, 2014
@jaswrks
Copy link
Contributor

jaswrks commented Oct 2, 2014

Example log file entry for CB IPN v6...

LOG ENTRY: Thu Oct 2nd, 2014 @ precisely 9:32 am UTC
PHP v5.4.32 :: WordPress v4.0 :: s2Member v140921 :: s2Member Pro v140921
Memory 14.19 MB :: Real Memory 14.75 MB :: Peak Memory 14.28 MB :: Real Peak Memory 14.75 MB
jason.websharks-inc.net/?s2member_pro_clickbank_notify=6\nUser-Agent: Apache-HttpClient/4.3.3 (java 1.5)
array (
  'transactionTime' => '2014-10-02T02:32:03-07:00',
  'receipt' => '4NT2E76G',
  'transactionType' => 'TEST_SALE',
  'vendor' => 'websharks1',
  'role' => 'VENDOR',
  'totalAccountAmount' => 62.82000000000000028421709430404007434844970703125,
  'paymentMethod' => 'TEST',
  'totalOrderAmount' => 69,
  'totalTaxAmount' => 0,
  'totalShippingAmount' => 0,
  'currency' => 'USD',
  'orderLanguage' => 'EN',
  'lineItems' => 
  array (
    0 => 
    stdClass::__set_state(array(
       'itemNo' => '2',
       'productTitle' => 's2Member® Pro (Single-Site License)',
       'shippable' => false,
       'recurring' => true,
       'accountAmount' => 62.82000000000000028421709430404007434844970703125,
       'paymentPlan' => 
      stdClass::__set_state(array(
         'rebillStatus' => 'ACTIVE',
         'rebillFrequency' => 'WEEKLY',
         'rebillAmount' => 10,
         'paymentsProcessed' => 1,
         'paymentsRemaining' => 998,
         'nextPaymentDate' => '2014-10-09T02:32:03-07:00',
      )),
       'downloadUrl' => 'http://jason.websharks-inc.net/?s2member_pro_clickbank_return=1&item=2&cbreceipt=4NT2E76G&time=1412242323&cbpop=55DB80DA&cbaffi=0&cname=John+Doe&cemail=jas%40wsharks.com&ccountry=US&czip=99688&cbskin&s2_invoice=1&s2_p1=0+D&s2_p3=1+M&s2_desc=Bronze+Member+%2F+description+and+pricing+details+here.&s2_custom=jason.websharks-inc.net&s2_customer_ip=216.137.234.68&s2_subscr_id=s2-542d188f5d7d2&_s2member_sig=1412241551-c070afbf3d1ac181e3bb8a5f33ab6c02',
    )),
  ),
  'customer' => 
  stdClass::__set_state(array(
     'shipping' => 
    stdClass::__set_state(array(
       'firstName' => 'JOHN',
       'lastName' => 'DOE',
       'fullName' => 'John Doe',
       'email' => 'jas@wsharks.com',
       'address' => 
      stdClass::__set_state(array(
         'county' => 'MATANUSKA SUSITNA',
         'state' => 'AK',
         'postalCode' => '99688',
         'country' => 'US',
      )),
    )),
     'billing' => 
    stdClass::__set_state(array(
       'firstName' => 'JOHN',
       'lastName' => 'DOE',
       'fullName' => 'John Doe',
       'email' => 'jas@wsharks.com',
       'address' => 
      stdClass::__set_state(array(
         'state' => 'AK',
         'postalCode' => '99688',
         'country' => 'US',
      )),
    )),
  )),
  'version' => 6,
  'attemptCount' => 1,
  's2member_log' => 
  array (
    0 => 'IPN received on: Thu Oct 2, 2014 9:32:21 am UTC',
    1 => 's2Member POST vars verified with ClickBank.',
    2 => 'ClickBank transaction identified as ( `SALE/RECURRING` ).',
    3 => 'IPN reformulated. Piping through s2Member\'s core/standard PayPal processor as `txn_type` ( `subscr_signup` ).',
    4 => 'Please check PayPal IPN logs for further processing details.',
  ),
  's2vars' => 
  array (
    'cbskin' => '',
    's2_invoice' => '1',
    's2_p1' => '1 M',
    's2_p3' => '1 M',
    's2_desc' => 'Bronze Member / description and pricing details here.',
    's2_custom' => 'jason.websharks-inc.net',
    's2_customer_ip' => '216.137.234.68',
    's2_subscr_id' => 's2-542d188f5d7d2',
    '_s2member_sig' => '1412241551-c070afbf3d1ac181e3bb8a5f33ab6c02',
  ),
)

jaswrks pushed a commit to wpsharks/s2member-pro that referenced this issue Oct 2, 2014
jaswrks pushed a commit to wpsharks/s2member-pro that referenced this issue Oct 3, 2014
jaswrks pushed a commit that referenced this issue Oct 3, 2014
@jaswrks jaswrks closed this as completed Oct 4, 2014
@jaswrks
Copy link
Contributor

jaswrks commented Oct 4, 2014

Next release changelog:

  • (s2Member Pro) ClickBank IPN v6: This release enables a new integration option for site owners integrated with ClickBank. You may now choose to integrate with v6 of ClickBank's IPN service, since all previous versions are slowly being phased out by ClickBank. Please see: Dashboard ⥱ s2Member ⥱ ClickBank Options ⥱ IPN Integration for v6 config. options. See also this GitHub issue if you'd like further details regarding this topic. See also: this article @ ClickBank.

@jaswrks
Copy link
Contributor

jaswrks commented Oct 4, 2014

2014-10-04_02-13-39

@BitPopCoin
Copy link

Their docs are horrific. Thanks for some code

@wpsharks wpsharks locked and limited conversation to collaborators Jan 12, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants