So I have a unusual request I think.
I want to setup a 7 week subscription via Paypal and have created a custom button to do so.
I need s2Member to send back access to a Custom Post/Page like it would with a "standard" button/ IPN return from Paypal, so I am trying to make it accept the IPN reply from Paypal with associated information.
I have tried a couple of things, and I keep getting this error "Unexpected txn_type/status' error upon IPN request"
I think it might be the line <input type="hidden" name="cmd" value="_s-xclick"> (Also * in code below)
but if I remove this and make it "<input type="hidden" name="cmd" value="_xclick">" it doesn't ask the person to subscribe, so therefore doesn't work.
Any thoughts? I need the action of a standard button with a subscription (I will be manually sending letters out each week with manually created access codes after the first week)
Or maybe another idea on how best to manage 7 emails with 7 access links to 7 pages, each for 1 week, over 7 weeks.
Thanks
C
- Code: Select all
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick"> **
<input type="hidden" name="hosted_button_id" value="L22LXBTDCGWGG">
<input type="hidden" name="business" value="info@truesecrets.com.au" />
<!-- Instant Payment Notification & Return Page Details -->
<input type="hidden" name="rm" value="2" />
<!-- Configures Basic Checkout Fields -->
<input type="hidden" name="lc" value="" />
<input type="hidden" name="no_shipping" value="1" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="custom" value="www.truesecrets.com.au" />
<input type="hidden" name="currency_code" value="AUD" />
<input type="hidden" name="page_style" value="paypal" />
<input type="hidden" name="charset" value="utf-8" />
<input type="hidden" name="item_name" value="One a True Secret a Week" />
<input type="hidden" name="item_number" value="sp:1259:168" />
<input type="hidden" name="amount" value="8" />
<!-- Configures s2Member's Unique Invoice ID/Code -->
<input type="hidden" name="invoice" value="<?php echo S2MEMBER_VALUE_FOR_PP_INV(); ?>" />
<!-- Associates Purchase With A User/Member ( when/if applicable ) -->
<input type="hidden" name="on0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0; ?>" />
<input type="hidden" name="os0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0; ?>" />
<!-- Identifies The Customer's IP Address For Tracking -->
<input type="hidden" name="on1" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1; ?>" />
<input type="hidden" name="os1" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1; ?>" />
<!-- Displays The PayPal® Image Button -->
<input type="image" src="https://www.paypalobjects.com/en_AU/i/btn/btn_subscribeCC_LG.gif" border="0" name="submit" alt="PayPal — The safer, easier way to pay online.">
<img alt="" border="0" src="https://www.paypalobjects.com/en_AU/i/scr/pixel.gif" width="1" height="1">
</form>