ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Paypal IPN write direct to channel entry

May 16, 2012 8:13am

Subscribe [3]
  • #1 / May 16, 2012 8:13am

    Sam Sullivan

    64 posts

    I’m using Safecracker where users fill out a form and then pay a single payment via a Paypal button using basic form.

    At the moment I manually mark a custom field called ‘paid’ in the channel entry to yes.

    Is there a way to use Paypal’s IPN to write directly into a channel entry?

  • #2 / May 16, 2012 9:47am

    Sam Sullivan

    64 posts

    I just had a look at Simple Commerce and it should do the trick.

    Problem now is I can’t see any purchases being logged, there’s also no IPN history in Paypal (sandbox).

    Can you confirm that http://www.site.com/?ACT=46 is correct IPN URL?

    thanks

  • #3 / May 16, 2012 12:15pm

    DanL

    56 posts

    I did something similar a few months back…but I’m using the following:

    <input type=“hidden” value=”{site_url}/?ACT=20” name=“notify_url”/>

    ...so you might want to check what /?ACT=46 is.

    Also I had problems with sandbox so had to test with live PP payments in the end, which *did* work.

  • #4 / May 16, 2012 12:27pm

    Sam Sullivan

    64 posts

    Hi Dan -

    did you use Simples Commerce? I can’t seem to edit the URL with ACT=46.

    I tried as hidden field didn’t work either.

  • #5 / May 16, 2012 12:31pm

    DanL

    56 posts

    I did use the SCM, yes.

    I created a manual PayPal form in my template rather than relying on the auto-generated code from SCM (which didn’t work the way I needed it too).

  • #6 / May 16, 2012 1:01pm

    Sam Sullivan

    64 posts

    Do you remember which Paypal variable passed the entry_id back to CMS ? is it item_number

  • #7 / May 16, 2012 1:08pm

    DanL

    56 posts

    Pretty sure I had to use a tonne of PHP & custom queries to match up purchased items with channel entries.  It wasn’t easy, that I do remember.

  • #8 / May 16, 2012 1:14pm

    Sam Sullivan

    64 posts

    Querying the purchases + channels I can handle, I’m looking forward to it, it’s getting Paypal to talk to my server is the struggle, seeing that there’s no IPN history seems to suggest so.

  • #9 / May 17, 2012 11:01am

    Shane Eckert

    7174 posts

    Hello Sam,

    How are things going? Did you get this to work for you? It looks like DanL was able to give you some direction.

    Cheers,

  • #10 / May 21, 2012 6:33am

    Sam Sullivan

    64 posts

    Hi,

    Yes thanks, I got IPN working and can see purchases ok - I missed out the debug = TRUE for sandbox testing.

    Trouble now is I can’t set my own amount to send to Paypal in the template, I have to use SCM’s item regular or sale price.


    Hey Dan, did you override them?


    I would like this to happen:

    {exp:simple_commerce:purchase entry_id="1096" success="site/success" cancel="site/index"}
    
    Do not use SCM price: {item_regular_price}
           
    Use my price: <input type="hidden" name="amount" value="123.00" /> 
    
    <input type="submit" class="button"/>
    
    {/exp:simple_commerce:purchase}
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases