3

I need add recurring payments to my site. Before registration user must pay for example 10 GBP for 1 month and thereafter 9 GBP every month. I try to create recurring payment according to [PayPal][1]. But in IPN i am not recieved responce subscr_signup or other. When i completed doExpressChechoutPayment i recieved status Pending. How much time i must wait for authorization is complete? i use sandbox.

iurii_n
  • 1,330
  • 10
  • 17

1 Answers1

2
 'PAYMENTREQUEST_0_PAYMENTACTION'=>urlencode('Authorization'),

Should be:

 'PAYMENTREQUEST_0_PAYMENTACTION'=>urlencode('Sale'),

An authorization will 'hold' the transaction amount (guaranteed by PayPal for up to 3 days, afterwards available for another 26 days), after which you can capture a partial or full amount of the authorized transaction.
In order to immediately capture the funds, set the paymentaction to 'Sale'.
See also PayPal.com: Using Authorization & Capture

Robert
  • 19,326
  • 3
  • 58
  • 59
  • I excluded doExpressCheckoutPayment API. Then i completed createRecurringProfile, according to this method - http://thereforei.am/2011/07/11/paypal-digital-goods-subscriptions-with-php/. Payment completed successfuly, but i am never recieved in IPN response txn_type=subscr_signup. Maybe you know what? – iurii_n Feb 24 '12 at 15:38
  • Have a look under History > IPN History within the account, and see if the IPN was even generated. If it was, it's your script that's for some reason not receiving it. – Robert Feb 25 '12 at 23:04
  • 1
    Oh, and ensure your script runs on port 80 or 443. PayPal will not deliver IPN to URL's on any other port beside 80 / 443. – Robert Feb 25 '12 at 23:05
  • in IPN History i have all messages, but in txn_type i never seen 'subscr_signup', but i recieved txn_type = recurring_payment_profile_created. Maybe this is equal subscr_signup? When i canceled recurring payment profile, i recieved txn_type = recurring_payment_profile_canceled – iurii_n Feb 27 '12 at 08:42
  • Ah, yes, for recurring payments you'll receive recurring_payment_profile_created. subscr_signup is limited to subscriptions starting with S-. Apologies for missing this earlier. – Robert Feb 27 '12 at 10:19
  • How i can set type S or it is not necessarily and i can work with current settings? – iurii_n Feb 27 '12 at 10:58
  • PayPal moved from creating 'subscriptions' (prefixed with S-) to 'recurring payment profiles' (prefixed with I-) back in 2009; all subscriptions and recurring payments (via Express Checkout) created after that time will be the I- type. – Robert Feb 27 '12 at 12:56
  • Thank you very much! You realy helped me!) – iurii_n Feb 27 '12 at 13:25
  • one more question: can i set own field to send it to paypal and will recieved it in ipn and nvp responses? for example i need to send user_id, and after response update some fields in db where user_id = my request value – iurii_n Feb 28 '12 at 11:18
  • Yes, `CUSTOM` is available for this. – Robert Feb 29 '12 at 00:49