Copied to clipboard

Flag this post as spam?

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


  • Gordon Saxby 1465 posts 1887 karma points
    Mar 19, 2009 @ 00:13
    Gordon Saxby
    0

    PayPal "Website Payments Standard" - help!

    Maybe it's just late / I'm tired - but this doesn't seem to be as simple as it should be!!

    I have a site in Umbraco V4 using Master templates with a "runat=server" form.

    I need to be able to create the "Buy" button dynamically, or at least be able to enter the amount to be passed to PayPal.

    Has anyone done something similar in V4? My needs are fairly basic - member logs in and views an invoice. The page has a PayPal button on it with the amount (and invoice number?) assigned. Member clicks button and goes to PayPal, etc.

    I would also want to setup IPN to process the payment ... but one step at a time, eh ;-)

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Mar 19, 2009 @ 08:37
    Dirk De Grave
    0

    Hi Gordon,

    I'm not sure if this fits your needs, but here's what I did:

    - Put Paypal image button on a form (a asp:ImageButton)
    - Redirect to Paypal's site (and building that ugly url that holds all parameters) on image button click.

    It works great for me, and might be a solution for you as well. I'm sure they're other ways to solve this... Love to hear about other's solutions.

    Hope this helps.

    Regards,
    /Dirk

  • Gordon Saxby 1465 posts 1887 karma points
    Mar 19, 2009 @ 10:46
    Gordon Saxby
    0

    Thanks for your reply Dirk.

    Did you make your own graphic, store a copy of a PayPal button locally, or point to one at PayPal (somehow?).

    Can you point me in the right direction for creating the PayPal URL please?

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Mar 19, 2009 @ 11:02
    Dirk De Grave
    0

    Hi Gordon,

    I've been using Paypal's image url, let me find that url again...

    Here's where you'll find lots of links to docs...

    https://cms.paypal.com/us/cgi-bin/?cmd=render-content&contentID=developer/howtohtmlwpstandardoverview

    It should be possible to use a form with hidden fields and submit using post to Paypal but I couldn't get that working, so I swithced over to creating the url which Paypal also accepts...

    Be aware though. As soon as on Paypal' site, url parameters can be tampered, so you should also use IPN to verify whether users haven't been changing param values...

    Regards,
    /Dirk

  • Gordon Saxby 1465 posts 1887 karma points
    Mar 19, 2009 @ 11:17
    Gordon Saxby
    0

    [quote=Dirk]It should be possible to use a form with hidden fields and submit using post to Paypal...[/quote]
    The problem is that I have an ASP.Net form in the Master template which means I can't have a standard HTML form.

    Actually, would it be possible to alter the "action" property of the ASP.Net form on page load? (point it at PayPal) :-k

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Mar 19, 2009 @ 11:44
    Dirk De Grave
    0

    Hi Gordon,

    [quote]The problem is that I have an ASP.Net form in the Master template which means I can't have a standard HTML form. [/quote]

    And that is why I've been using an event handler that redirects to Paypal's site upon submit. All you need to do is build the correct url based on the relevant and various params and you're set.
    [code]
    https://www.paypal.com/cgi-bin/webscr?cmd=xclick-subscriptions&business=BusinessName&itemname=ItemName&itemnumber=1&invoice=0008004&pagestyle=PageStyle&noshipping=1&return=Returnurl&cancelreturn=Cancelurl&nonote=1&currencycode=USD&lc=US&bn=PP-SubscriptionsBF&charset=UTF-8&a1=15.00&p1=30&t1=D&a3=5.00&p3=30&t3=D&src=1&sra=1&rm=2[/code]

    Of course, not all params may be relevant to you, but you get the idea, right?

    Regards,
    /Dirk

  • Gordon Saxby 1465 posts 1887 karma points
    Mar 19, 2009 @ 14:05
    Gordon Saxby
    0

    [quote=Dirk]Be aware though. As soon as on Paypal' site, url parameters can be tampered, so you should also use IPN to verify whether users haven't been changing param values...[/quote]
    Does IPN apply to ALL payments made to the PayPal account, or can it be set to work for payments initiated via the web site only?

    E.g. it (IPN) wouldn't make sense / work if a payment was made directly to the PayPal account as key info for the IPN function, such as invoice number, would not be known!?

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Mar 19, 2009 @ 14:34
    Dirk De Grave
    0

    Hi Gordon,

    Don't know, I didn't have that requirement, I was only making payments through a website.
    Best place to ask is the Paypal developer forum. Just get an account and start asking questions. It's - like umbraco forum - much visited, even by Paypal professionals... I'm pretty sure you'll get an answer within a reasonable time frame.

    Cheers,
    /Dirk

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies