latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Clickbank Buttons Not Working (cbur cbfid)

Home Forums Community Forum Clickbank Buttons Not Working (cbur cbfid)

This topic contains 8 replies, has 3 voices. Last updated by  Jason (Lead Developer) 3 years, 4 months ago.

Topic Author Topic
Posted: Saturday Aug 10th, 2013 at 7:32 pm #55532
Ray Bernard
Username: lavarat

Hello

S2Member is somehow not passing my cbfid properly. I’m using the following button generated by S2Member

[s2Member-Pro-ClickBank-Button cbp="1" cbfid="mycbfidnumber" cbf="auto" level="1" ccaps="" desc="a description of my product" custom="my website url" tp="0" tt="D" rp="1" rt="L" rr="0" image="image url" output="anchor" /]

When I hover over the link it shows everything properly as in

1.mycbusername.clickbank.net/?cbfid=mycbfidnumber&s2memberinfo=etc&etc&etc

When I click the link however the link doesn’t pass correctly and every = turns into its hex value of %26… looks something like this:

https://ssl.clickbank.net/order/orderform.html?time=somenumber&vvvv=somenumber&item=1&vvar=cbskin%26cbfid%3D11854%26cbur%26cbf%26

Of course my clickbank flow doesn’t work at all because of this %26. I’ve tested a standard href of 1.mycbusername.clickbank.net/?cbfid=mycbfidnumber and the flow worked perfectly.

UPDATE:
I should mention that when I right click on the link generated by s2Member and just copy the link, paste it into the browser window it looks as follows:

http://1.myusername.pay.clickbank.net/?cbskin&cbfid=mycbfidnumber&cbur&cbf&s2_invoice=1&s2_p1&s2_p3&s2_desc&s2_custom=mywebaddress&s2_customer_ip=myipnumber&s2_referencing=12&_s2member_sig=some long generated number

This looks correct but when I hit enter, clickbank spits this out:

https://ssl.clickbank.net/order/orderform.html?time=somenumber&vvvv=someothernumber&item=1&vvar=cbskin%26cbfid%3Dmycbfidnumber%26cbur%26cbf%26s2_invoice%3D1%26s2_p1%26s2_p3%26s2_desc%26s2_custom%3Dmywebsiteaddress%26s2_customer_ip%3Dmyipaddress%26s2_referencing%3D12%26_s2member_sig%some long generated number.

I tested a couple different things but clickbank seems to only recognize the cbfid number when I remove cbur completely from the original link generated by s2Member. When I remove cbur from the original copied link clickbank spits this out when put into the browser.

https://ssl.clickbank.net/order/orderform.html?time=somenumber&vvvv=somenumber&item=1&cbfid=mycbfidnumber&cbf=somenumber&vvar=cbfid%3Dmycbfidnumber%26s2_invoice%3D1%26s2_p1%26s2_p3%26s2_desc%26s2_custom%3Dmywebsiteaddress%26s2_customer_ip%3Dmyipaddress%26s2_referencing%3D12%26_s2member_sig%some long generated number

This at least passes the cbfid properly and the pitchplus works. Everything else still uses their hex values of %26 instead of =.

Also, this wouldn’t be so urgent if I could simply remove the cbur parameter straight from the s2Member button generators code. When I do s2Member STILL passes these parameters through to the payment link. I believe you can only pass cbfid and cbur seperately in payment links. Cbur seems to make clickbank completely ignore the cbfid.

What do I do here? Please advise ASAP.

Thanks

List Of Topic Replies

Viewing 8 replies - 1 through 8 (of 8 total)
Author Replies
Author Replies
Posted: Tuesday Aug 13th, 2013 at 4:30 am #55628
Bruce
Username: Bruce
Staff Member

Thank you for reporting this important issue.

I’m very sorry for the delay over the weekend.

Could you please add a cbur value to your Button Shortcode? This value should either be an a or d, based on what ClickBank tells you to set. You can check this part of the Dashboard for info on that:

Dashboard -› s2Member® -› ClickBank® Buttons -› Shortcode Attributes (Explained)

I believe that will fix your issue. It sounds to me like something is going wrong with the URL, and it’s replacing the ampersands (&) with %26 when s2Member urlencodes the URL. I will see if it’s possible to get a default value in here, but in the short-term just adding the correct value to cbur should work.

If it does not I will need to contact our development team for their thoughts, so let me know if that works. Thanks.

Posted: Tuesday Aug 13th, 2013 at 10:35 am #55674
Ray Bernard
Username: lavarat

Hi Bruce

Passing a cbur value is not the issue. Cbur passes just fine. CBFID doesn’t pass when CBUR is in the url.

From what I can see, you must either pass CBUR OR CBFID. CBUR in fact takes precedence which completely cancels out the CBFID. When this happens the clickbank upsell flow doesn’t initiate because clickbank doesn’t see the CBFID.

S2member’s shortcode works just fine in the sense that it generates a clickbank URL properly with the = signs when you look above. The only problem is that s2Member needs to pass either the cbur OR the cbfid, not both. And when I say pass, the link can’t contain cbur at all even if there is no value assigned to it (a or d). This allows clickbank to recognize the CBFID.

I hope I’m explaining this clearly enough. Your development team can test this if they like. Cbur and cbfid can’t pass in the same url.

Anyways please help so I can complete my setup.

Ray

Posted: Tuesday Aug 13th, 2013 at 6:18 pm #55696
Bruce
Username: Bruce
Staff Member

Passing a cbur value is not the issue. Cbur passes just fine. CBFID doesn’t pass when CBUR is in the url.

What I’m saying is not that the issue is that there is no value as far as the reason that ClickBank is not getting the cbfid value. The issue is going on with the process of urlencoding the string. If you’ll look at the query string:

?time=somenumber&vvvv=someothernumber&item=1&vvar=cbskin%26cbfid%3Dmycbfidnumber%26cbur%26cbf%26s2_invoice%3D1%26s2_p1%26s2_p3%26s2_desc%26s2_custom%3Dmywebsiteaddress%26s2_customer_ip%3Dmyipaddress%26s2_referencing%3D12%26_s2member_sig%some

You see that at a certain point, the URL stops generating ampersands (&) and uses %26. This is a result of an improperly-formatted URL when it’s passed through PHP’s urlencode function:

http://php.net/manual/en/function.urlencode.php

The URL above has only 4 set variables for this reason:

time, vvvv, item, and vvar. The vvar variable’s content is this, because the ampersands that usually separate the variables in the URL have been urlencoded as %26:

cbskin%26cbfid%3Dmycbfidnumber%26cbur%26cbf%26s2_invoice%3D1%26s2_p1%26s2_p3%26s2_desc%26s2_custom%3Dmywebsiteaddress%26s2_customer_ip%3Dmyipaddress%26s2_referencing%3D12%26_s2member_sig%some

That is what’s causing the issue, not the variables that are passed themselves, but corruption of the variables, and I’m unsure what is causing this in this URL, because it has been edited. If adding a value to cbur does not change the outcome, we will need to take a look at your installation to see what’s causing this.

Posted: Tuesday Aug 13th, 2013 at 6:40 pm #55702
Ray Bernard
Username: lavarat

Incorrect. Let’s just forget s2Member for a minute. Try this basic clickbank setup

http://1.thgbible.pay.clickbank.net/?cbfid=11854 <—–Working Link

Produces this which is perfect (cbfid works and so does the upsell):

https://ssl.clickbank.net/order/orderform.html?time=1376433156&vvvv=7468676269626c65&item=1&cbfid=11854&cbf=VS6CEKTFSJ&vvar=cbfid%3D11854

http://1.thgbible.pay.clickbank.net/?cbfid=11854&cbur <—- This Link Does Not Work Because CBUR is favored

Produces this. CBFID does not pass. (pitch page does not redirect to upsell)

https://ssl.clickbank.net/order/orderform.html?time=1376433239&vvvv=7468676269626c65&item=1&vvar=cbfid%3D11854%26cbur

Cbfid does not work when you add Cbur. You can’t pass both variables in one string. Clickbank favors cbur so the cbfid is ignored.

HOWEVER, if I actually want to pass the CBUR variable (on my upsell page) as “a” or “d” then cbfid can be in the string because it’s simply ignored and cbur is favored.

http://1.thgbible.pay.clickbank.net/?cbfid=11854&cbur=a

Below cbur passes fine. Cbfid is ignored which is fine in this case because I want cbur defined.

https://ssl.clickbank.net/order/orderform.html?time=1376434146&amp;vvvv=7468676269626c65&amp;item=1&amp;cbur=a&amp;vvar=cbfid%3D11854%26cbur%3Da

Please forward on to your development team. This is a huge issue. I don’t see how anyone can actually be using your pitch plus capability since passing both variables does not work.

Please Note:
This first post may have been slightly misleading. The issue here has nothing to do with urlencode so please forget I mentioned that. S2Member reads all the data that clickbank passes just fine. Things like membership level, IP, etc. The only major issue I have is the cbfid and cbur can’t be passed in the same clickbank link.

Posted: Wednesday Aug 14th, 2013 at 12:32 am #55723
Staff Member

Thanks for the heads up on this thread :-)

This first post may have been slightly misleading. The issue here has nothing to do with urlencode so please forget I mentioned that. S2Member reads all the data that clickbank passes just fine. Things like membership level, IP, etc. The only major issue I have is the cbfid and cbur can’t be passed in the same clickbank link.

Right. The urlencoding that ClickBank does on their end, is on purpose. While it may look wrong to the naked eye, that’s actually correct. It’s just a bit odd to see the URL-encoded values all combined into a single variable on the ClickBank side of things (e.g. they combine several vars into vvar= on their side).

I’m investigating the other issue now. One moment please.

Posted: Wednesday Aug 14th, 2013 at 12:42 am #55725
Staff Member

Please forward on to your development team. This is a huge issue. I don’t see how anyone can actually be using your pitch plus capability since passing both variables does not work.

Thanks for reporting this important issue. So it appears that ClickBank has started reading an empty cbur value where it did not in the past. We’re having this updated for the next maintenance release. However, if you can help us test this further by experimenting with the PATCH I’m attaching here, that would be great :-)

If all works well, these changes will make it into the next release.

Download this ZIP please: http://d1v41qemfjie0l.cloudfront.net/s2member/uploads/2013/08/clickbank-patch.zip

Patch/update an existing release of s2Member® Pro v130802

Unzip and extract two files from the ZIP I linked to above.

Upload and allow this file clickbank-checkout-button.php to override your existing copy of.
/wp-content/plugins/s2member-pro/includes/templates/buttons/clickbank-checkout-button.php

Upload and allow this file clickbank-button-in.inc.php to override your existing copy of.
/wp-content/plugins/s2member-pro/includes/classes/gateways/clickbank/clickbank-button-in.inc.php

Posted: Wednesday Aug 14th, 2013 at 7:04 pm #55797
Ray Bernard
Username: lavarat

Thanks that patched did the trick! You’re my hero lol.
I can finally go get some sales.

Posted: Wednesday Aug 14th, 2013 at 11:35 pm #55808
Staff Member

Thanks that patched did the trick! You’re my hero lol.
I can finally go get some sales.

Thank you for reporting back! You’re very welcome.

Viewing 8 replies - 1 through 8 (of 8 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.