fix: ignore if profile already in cancelled state
This commit is contained in:
parent
56cef48169
commit
b4d01ff8ee
1 changed files with 5 additions and 1 deletions
|
|
@ -367,7 +367,11 @@ def manage_recurring_payment_profile_status(profile_id, action, args, url):
|
|||
|
||||
response = make_post_request(url, data=args)
|
||||
|
||||
if response.get("ACK")[0] != "Success":
|
||||
# error code 11556 indicates profile is not in active state(or already cancelled)
|
||||
# thus could not cancel the subscription.
|
||||
# thus raise exception only if error code not quals to 11556
|
||||
|
||||
if response.get("ACK")[0] != "Success" and response.get("L_ERRORCODE0", [])[0] != '11556':
|
||||
frappe.throw(_("Failed while amending subscription"))
|
||||
|
||||
@frappe.whitelist(allow_guest=True)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue