Hi,

By using this functions "recurly_account_get_subscriptions" only expired and active plan will able to retrieve from the recurly, so I have done some changes in code by which user will also able to get the canceled subscription of the users, so if we have to do something with canceled subscription we can do by directly calling this function and pass "canceled" in status parameter.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vishnusoniskr created an issue. See original summary.

vishnusoniskr’s picture

vishnusoniskr’s picture

Hi,

Have you tested this patch.

markdorison’s picture

Status: Needs review » Needs work

@vishnusoniskr Can you provide testing instructions? Does this result in any changes into what users will see in the current UI?

+++ b/recurly.module
@@ -470,9 +473,12 @@ function recurly_account_get_subscriptions($account_code, $state) {
+  return $accounts[$account_code] + $accounts[$account_code] + $accounts[$account_code];

I don't think this change is necessary. In fact, I think the line doesn't make sense as it is. I will open a new issue to address that.

vishnusoniskr’s picture

Status: Needs work » Needs review

Hi Mark,

I have checked that if any user wants to get the cancel subscription of the user then according to your module file user is not able to get the cancel subscription, that's why I have created this patch, so please check this.

markdorison’s picture

Status: Needs review » Needs work

@vishnusoniskr In #4 I asked:

Does this result in any changes into what users will see in the current UI?

In #4 I also asked for the following change:

+++ b/recurly.module
@@ -470,9 +473,12 @@ function recurly_account_get_subscriptions($account_code, $state) {
+  return $accounts[$account_code] + $accounts[$account_code] + $accounts[$account_code];
I don't think this change is necessary. In fact, I think the line doesn't make sense as it is. I will open a new issue to address that.

This is addressed in #2897932: recurly_account_get_subscriptions combines array with itself on return, so please remove this change from your diff.