4

I don't get it.. I tested out the subscription button in Sandbox mode and it ran through successfully. The test-business received the payment, and the notify_url was called just fine. But as soon as I swapped out of Sandbox mode, the business still gets payed, the subscription successfully gets set up, but the notify_url isn't even being called. The ONLY things I'm changing between the live/sandbox forms are:

{if $sandbox == TRUE}
    <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
{else}
    <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
{/if}

and

{if $sandbox == TRUE}
     <input type="hidden" name="hosted_button_id" value="46CVBBYCFHPSY" />
{else}
     <input type="hidden" name="hosted_button_id" value="VCL8LGQUWCM5E" />
{/if}

and just in case it matters... the rest of it looks like:

        <input type="hidden" name="cmd" value="_s-xclick" /><input type="image" src="https://www.paypal.com/en_US/GB/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online." />
        <input type="hidden" name="custom" value="{$user->user_info.user_id}" />
        <input type="hidden" name="return" value="http://www.singlesikhs.co.uk/dev/singlesikhs/payment.php?task=success" />
        <input type="hidden" name="notify_url" value="http://www.singlesikhs.co.uk/dev/singlesikhs/payment_paypal.php?action=ipn" />
        <input type="hidden" name="cancel_return" value="http://www.singlesikhs.co.uk/dev/singlesikhs/payment.php?task=cancel" />
        <img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">
    </form>

Why oh why is this not working ?? I'm pulling my hair out over here trying to figure this out for my client. I can't figure where things are going wrong. Please help me, I'm supposed to get this finished for my client asap. I've got everything else working 100% except this 1 thing. Thanks..

glitchyme
  • 235
  • 3
  • 12
  • One thing though. How were you able to create a hosted_button_id for the sandbox account? – FoF Feb 07 '12 at 09:40

3 Answers3

2

I asked over on the PayPal forums and found out what was going wrong. Apparently for subscriptions, the business account must manually enter in their IPN settings under their profile.

Click here for source

onkar
  • 4,427
  • 10
  • 52
  • 89
glitchyme
  • 235
  • 3
  • 12
  • I had my IPN settings disabled under profile and I was passing the notify_url for each of my sites. It was working until a couple of months ago. Has anything changed at Paypal? – Picflight Feb 22 '12 at 17:31
  • @Picflight: got the same issue. My sandbox was working before. But not its not sending any notification(IPN). Im not sure what happens :( – Leysam Rosario Jun 22 '12 at 13:42
  • To boot - here is my [question](http://stackoverflow.com/questions/20602818/paypal-production-working-differently-than-sandbox) as well with a similar issue. Everything is working just great in sandbox, but not in production. – Kelly J Andrews Dec 17 '13 at 15:31
  • @glitchyme, Please update the link. Its not working. – Kathir Jul 08 '14 at 10:19
0

You need activate IPN on production account:

https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNSetup/

Click the profile icon (Profile menu) on the top right side of the page. From the Business Profile menu, select Profile and Settings, then select My selling tools. ...

Click Receive IPN messages (Enabled) to enable your listener.

Pablo Martinez
  • 168
  • 1
  • 5
-6

i think here is minor change in this line.

 <input type="hidden" name="notify_url" value="http://www.singlesikhs.co.uk/dev/singlesikhs/payment_paypal.php?action=paypal" />

action=ipn" should replace to action=paypal".

Just try, this may work good..

Thanks.

Chandresh M
  • 3,808
  • 1
  • 24
  • 48