Вопрос

I have a front-end subscribe button generated by PayPal with a hidden field with name custom. From what I've read in the guides this field provides me a custom message I can send to the response page. My question is: Is the custom message sent through the IPN? If yes is it sent for each request concerning this subscription or is it just for the initial payment request?

If the answer to my question is no, then can someone help me understand how exactly can I get the user id from my web app to be sent over from the PayPal IPN. Email doesn't really work for me, because for example I use several different emails and I may register in the webapp with one email and use another for paypal.

Any help regarding the issue is most welcome.

Это было полезно?

Решение

According to my database logs it isn't sent for at least the following transaction types (and note that I haven't tested them all, although you can conclude I've tested most of the subcription-related ones):

  • send_money (there having been no opportunity for you to send it)

It definitely is sent with the following:

  • invoice_payment (although I have them both with and without: this seems to be the 'notes to yourself' field when sending a PP invoice)
  • subscr_failed (ditto) (I wasn't always sending it)
  • subscr_payment (ditto) (I wasn't always sending it)
  • recurring_payment_suspended_due_to_max_failed_payment (ditto) (I wasn't always sending it)
  • subscr_signup
  • subscr_cancel
  • subscr_eot

Другие советы

I haven't tested this specifically, but I'm pretty sure the CUSTOM parameter would only come back in the original IPN you get from creating a new profile.

What you can do is save this original IPN data into a local database table called "subscription_profiles" or something like that. IPN's for new profiles would include the profile ID, your CUSTOM data, etc. Save this accordingly.

Future IPN's for transactions related to the IPN would come with the same profile ID. You can save these to your database in a "subscription_transactions" table, and make sure to save the profile ID here, too.

That way, your local subscription_profiles and subscription_transactions tables would be related on the profile_id field, and you would be able to pull all the data you might need for this based on that relationship in your local data.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top