Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Stephen 204 posts 246 karma points
    Sep 10, 2011 @ 19:12
    Stephen
    0

    Simple Paypal integration

    Hey all,

    Looking to do a simple Paypal integration.

    I've looked at uCommerce (which looks great) but is a bit overkill for what i want.  All i need is a simple list of products with a purchase button. 

    Is there a way i can do this by attaching code to the buttons, which are within my XSLT file.  I have the items listed like below...

    http://davidorrgolfcoaching.com/buy-golf-coaching-vouchers.aspx

    Any help would be appreciated.

    Stephen

  • skiltz 501 posts 701 karma points
    Sep 11, 2011 @ 00:40
    skiltz
    0

    I usually created an asp.net usercontrol to do this.  example below:

      <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="business" value="[email protected]">
    <input type="hidden" name="lc" value="NZD">
    <input type="hidden" name="item_name" value="Name of purchased item">
    <input type="hidden" name="amount" value="11.90">
    <input type="hidden" name="currency_code" value="NZD">
    <input type="hidden" name="bn"
      value="PP-BuyNowBF:btn_buynow_LG.gif:NonHostedGuest">
      <input type="hidden" name="return" value="http://www.mycompany.co.nz/return.aspx" />
      <input type="hidden" name="notify_url" value="http://www.mycompany.co.nz/process.aspx" />
    <asp:ImageButton ValidationGroup="eigh" ID="ImageButton1" runat="server"
      ImageUrl="https://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif"
      PostBackUrl="https://www.paypal.com/cgi-bin/webscr" />

     

  • Stephen 204 posts 246 karma points
    Sep 11, 2011 @ 10:34
    Stephen
    0

    thanks for the reply, i had hoped umbraco would allow me to do something without the need for a control...and i had hoped to do it without going to a detail page for each product.

    I have my own .net code that does what i want, guess i can adapt it and import it into Umbraco.

    Thanks again.

    S

     

  • Stephen 204 posts 246 karma points
    Sep 12, 2011 @ 12:50
    Stephen
    0

    could i do this by reading from the nodes in .net?

    S

  • Max Mumford 266 posts 293 karma points
    Sep 13, 2011 @ 11:44
    Max Mumford
    0

    This can definitly be done in XSLT. The way I would approach it is have a node type for products with properties for each product price, name, category etc. You can then interate through the product nodes in XSLT and output the paypal button code, pulling down the property values as you go....

    You can do something like:

    <input type="hidden" name="item_name">
    <xsl:attribute name="value"><xsl:value-of select="$node/@nodeName" /></xsl:attribute>
    </input>

    This will add the attribute "value" to the input tag with the node's name as the attributes content.

  • Stephen 204 posts 246 karma points
    Sep 13, 2011 @ 11:56
    Stephen
    100

    Yeah Max thats roughly the way i ended up doing it as seen here...however the slight issue i had was with regards paypal requiring its own forms on the page...got round it with a javascript version, really happy with the outcome.

    http://davidorrgolfcoaching.com/buy-golf-coaching-vouchers.aspx

     

    Cheers,

     

     

     

  • Max Mumford 266 posts 293 karma points
    Sep 13, 2011 @ 12:03
    Max Mumford
    0

    Glad its sorted. Enjoy!

Please Sign in or register to post replies

Write your reply to:

Draft