Django-paypal recurring_payment_id is empty

I am using django-paypal in my django application. I am trying to create a recurring payment like:

paypal_dict = { "cmd": "_xclick-subscriptions", "business": settings.PAYPAL_RECEIVER_EMAIL, "item_name": self.subscription.name, "a3": str(self.subscription.rate), "p3": 1, "t3": self.subscription.recuring_type, "src": "1", "sra": "1", "no_note": "1", "invoice": "%s" % str(self.order.pk), "notify_url": "my_notify_url", "return_url": "my_success_url", "cancel_return": "my_cancel_url", "currency_code": self.subscription.currency.code, } paypal_form = PayPalPaymentsForm(initial=paypal_dict, button_type="subscribe") 

I received only two ipn, which are subscr_signup and subscr_payment , which is normal. I received payment_was_successful , which is good. The problem is that ipn_obj never mattered to recurring_payment_id and payment_status , both are always empty, and in the sandbox I see that a repeating profile is being created. Am I making a recurring payment incorrectly, am I missing some variable that identifies this as a recurring payment?

+4
source share
1 answer

When you get the variable "txn_type" with the value "subscr_signup", you do not get the variable "recurring_payment_id". You should get the variable "subscr_id" with the identifier of the duplicate profile you are looking for.

Using standard Payments subscribers, the value must begin as "S -"

There are two types of recurring payment variables for IPN messages. This is embarrassing - sorry.

+1
source

Source: https://habr.com/ru/post/1483150/


All Articles