Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: RecurringApplicationCharge: different behaviour when test is true vs null?

Solved

RecurringApplicationCharge: different behaviour when test is true vs null?

LetterT
Shopify Partner
53 5 19

On creating a RecurringApplicationCharge and redirecting to Shopify's "Approve Subscription" page,

 

When test is true, when the merchant selects "cancel", they will get a toast message "Charge Declined" and be redirect back to Admin/Apps. The recurring application charge is : "status": "declined"

 

HOWEVER, when test is null, when the merchant selects "cancel", they will get a toast message "The store cannot accept the provided charge" (which makes no sense to me) and there is no redirect at all.

 

The recurring application charge is:

"status": "pending",

and I can also see that "test": null

 

Why is the behaviour different, is this a bug?

Don't be shy, click that like button!
Accepted Solution (1)

JasonNg
Shopify Partner
2 1 1

This is an accepted solution.

This has happened to me recently. But there was no error when I cancel the non-test charge a month ago as I recall. Maybe a recent update changes the behavior. Anyway, I guess the error occurs because it is a test store or the store doesn't have a payment method, so I just ignore it. Although I also think the error makes no sense while canceling a charge

View solution in original post

Reply 1 (1)

JasonNg
Shopify Partner
2 1 1

This is an accepted solution.

This has happened to me recently. But there was no error when I cancel the non-test charge a month ago as I recall. Maybe a recent update changes the behavior. Anyway, I guess the error occurs because it is a test store or the store doesn't have a payment method, so I just ignore it. Although I also think the error makes no sense while canceling a charge