How to Create a PayPal "Subscribe" Module based on PayPal "Buy Now"?

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
5/21/2012 6:06:47 PM
Gravatar
Total Posts 19

How to Create a PayPal "Subscribe" Module based on PayPal "Buy Now"?

The document Building a Simple PayPal Buy Now Feature describes how to create a PayPal "Buy Now" (or "Donate") Module that can be added to a Page. In addition to "Buy Now" and "Donate", Paypal offers another payment method called "Subscribe". The HTML that PayPal generates for "Subscribe" is similar to that of "Buy Now" and "Donate" but adds a table, and "on0" and "currency_code" input lines as shown below. Does anybody know how to incorporate this additional HTML into the referenced Module code?

<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="ABCDEFGHIJKLM">
<table>
<tr><td><input type="hidden" name="on0" value="Donation Options">Donation Options</td></tr><tr><td><select name="os0">
<option value="Option 1">Option 1: $10.00 USD - monthly</option>
<option value="Option 2">Option 2: $15.00 USD - monthly</option>
<option value="Option 3">Option 3: $25.00 USD - monthly</option>
<option value="Option 4">Option 4: $50.00 USD - monthly</option>
<option value="Option 5">Option 5: $100.00 USD - monthly</option>
<option value="Option 6">Option 6: $250.00 USD - monthly</option>
<option value="Option 7">Option 7: $500.00 USD - monthly</option>
<option value="Option 8">Option 8: $1,000.00 USD - monthly</option>
</select> </td></tr>
</table>
<input type="hidden" name="currency_code" value="USD">

<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_subscribe_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_US/i/scr/pixel.gif" width="1" height="1">
</form>

 

5/23/2012 8:49:43 AM
Gravatar
Total Posts 18439

Re: How to Create a PayPal "Subscribe" Module based on PayPal "Buy Now"?

If you read the article you should know you cannot add a form element, you must use the PostBackUrl property of the button to set the postback url for the form that already exists in the page.

You should be able to add the rest of that markup with no problems, you just cannot add a form.

Hope that helps,

Joe

5/23/2012 9:09:56 AM
Gravatar
Total Posts 19

Re: How to Create a PayPal "Subscribe" Module based on PayPal "Buy Now"?

I did read the article. The Easy Developer Solution section of that article described how to create a PayPal Module (ascx) for the "Donate" or "Buy Now" form. I was able to create a "PayPal Donate" Module following those instructions. My problem is that the PayPal "Subscribe" form includes additional lines (the ones in bold in my original message) and I don't know how to include those lines in the Module code.

5/23/2012 9:22:37 AM
Gravatar
Total Posts 18439

Re: How to Create a PayPal "Subscribe" Module based on PayPal "Buy Now"?

You just copy and paste it into the markup of the control

12/27/2012 2:25:24 PM
Gravatar
Total Posts 13

Re: How to Create a PayPal "Subscribe" Module based on PayPal "Buy Now"?

I have successfully created an .ascx module for a "Subscribe" button (per Joe's directions), and it works as it should - up until PayPal returns to my site (I have my IPN return page set to "/Services/PayPalIPNHandler.aspx" on the PayPal site).  At this point, my website just "hangs," sitting there with a white screen, not doing anything discernible.  I looked at the source code for the IPN handler page, and cannot figure out what is going on.  What is PayPal sending/not sending that the IPN handler needs?

The process works perfectly for any cart items, just not for this Subscribe module.

Any help would be appreciated.

12/27/2012 2:36:22 PM
Gravatar
Total Posts 13

Re: How to Create a PayPal "Subscribe" Module based on PayPal "Buy Now"?

Sorry.  The above states IPN Handler, when I really meant the PDT handler.

You must sign in to post in the forums. This thread is closed to new posts.