5

I am using django-paypal into my django application. I am trying to create recurring payment as:

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's which is subscr_signup and subscr_payment which is ok. I received payment_was_successful which is good. The problem is that ipn_obj never had value for recurring_payment_id and payment_status, both are empty always and in sandbox i can see that recurring profile is created. Am i making recurring payment wrong, am i missing some variable which will identify this as recurring payment?

Aamir Rind
  • 38,793
  • 23
  • 126
  • 164

1 Answers1

2

When you receive a "txn_type" variable with a "subscr_signup" value you don't receive a "recurring_payment_id" variable. You should get a "subscr_id" variable with the Recurring Profile ID you're looking for.

With Payments Standard Subscriptions the value should start like this "S-"

There are two types of Recurring Payment variables for IPN posts. It's kinda confusing - sorry.

Gerzie
  • 2,330
  • 1
  • 12
  • 12
  • Yes i am getting `subscr_id`. But this is not what i want. Because i need the `recurring_payment_id` to check at times the `payment_status`. How can i update the above request to send me the `recurring_payment_id` and `profile_status`?? – Aamir Rind May 28 '13 at 19:08
  • When I create a Subscription button straight from the account it creates IPN posts with "recurring_payment" values returned. Custom buttons are given the "subscr_" values. I can't find the specific variable and value combination missing between the two If you used Express Checkout, Automatic Billing, or Installment Plans the IPN posts created "recurring_payment" values. – Gerzie May 28 '13 at 19:20