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.

SCM and PayPal IPN issues

December 16, 2008 5:04pm

Subscribe [1]
  • #1 / Dec 16, 2008 5:04pm

    molotovfx

    25 posts

    First let me say this is my fist crack at the SCM, so I am most likely missing something obvious. I’ve scowered the forums and wiki and clear SCM answers have been tough to come by. I have a very simple shop I am building and just want to add shirt size as an option but since doing that I have been unable to get the IPN to work. That only works when I use the EE created buy_now link. Which I am happy to use if the EE code will let me pass shirt size to paypal.

    I tried creating my own form based off of the Wiki posts and the transactions still work but they are no longer logged in EE and I don’t get my notification email anymore.

    This is what I have(i’m using the PayPal Dev Sandbox):

    {exp:weblog:entries weblog="shop" disable="member_data|trackbacks"}
    {exp:simple_commerce:purchase entry_id="{entry_id}" success="site/success" cancel="site/index"}
    <h2>{title}</h2>
    <p>{prod-desc}<br />
    <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method=“post" target="paypal"><br />
    <input type="hidden" name="cmd" value="_cart" /><br />
    <input type="hidden" value="http://mysite.com/index.php?ACT=31" name="notify_url"/><br />
    <input type="hidden" value="http://mysite.com/index.php?/shop/success/" name="return"/><br />
    <input type="hidden" value="http://mysite.com/index.php?/shop/" name="cancel_return"/><br />
    <input type="hidden" name="business" value="[email protected]"/><br />
    <input type="hidden" name="currency_code" value="USD"/><br />
    <input type="hidden" name="item_name" value="{title}"/><br />
    <input type="hidden" name="item_number" value="{item_id}"/><br />
    <input type="hidden" name="add" value="1"/><br />
    <input type="hidden" name="upload" value="1"/><br />
    <input type="hidden" name="no_shipping" value="2"/><br />
    <input type="hidden" name="no_note" value="1"/><br />
    <input type="hidden" name="shipping" value="5.95" /><br />
    <input type="hidden" name="amount" value="{prod-price}" /><br />
    <input type="hidden" name="on0" value="Sizes">Sizes<br />
    <select name="os0"><br />
        <option value="S">S <br />
        <option value="M">M <br />
        <option value="L">L <br />
        <option value="XL">XL <br />
    </select> <br />
    <input class="btn" type="submit" name="buy_now" id="buy_now_{entry_id}" value="Buy Now"></p><br />
    </form></p>
    
    <p>{/exp:simple_commerce:purchase}<br />
    {/exp:weblog:entries}

    I also added email debug code to my SCM module and have verified that paypal is sending the IPN, EE just isn’t loggin it for whatever reason.

    Any help is greatly appreciated.

  • #2 / Dec 16, 2008 8:16pm

    Greg Aker

    6022 posts

    Greetings molotovfx:

    Are you 100% sure that your notify_url is indeed action id 31?

    Also, looking at your code, you have a curly quote in the form method.  If that is in your template code, it could be causing a problem?  Or, it’s just due to translation to the forums.

  • #3 / Dec 17, 2008 9:30am

    molotovfx

    25 posts

    That’s a definite on the ACT #. I checked the code and the form did have the curly quote but that didn’t seem to hurt transactions going through.

  • #4 / Dec 17, 2008 8:38pm

    Greg Aker

    6022 posts

    molotovfx:

    I’d like to take a step back and do a sandbox test using purely EE code. 

    Can you please do a barebones template with the basic SCM tags.  Let’s 100% make sure that works.

    -greg

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases