-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Lines 87 to 96 in 0bf7b61
| if (!error) { | |
| if (data.status !== 'AUTHORIZED' && data.status !== 'AUTHORIZED_PENDING_REVIEW') { | |
| throw JSON.stringify(data); | |
| } | |
| result = data; | |
| // eslint-disable-next-line no-undef | |
| session.privacy.orderPaymentSuccessful = true; | |
| } else { | |
| throw JSON.stringify(data); | |
| } |
the two throws here are not the correct apple/salesforce way to handle the error.
This code should be updated to return a bad status response, something like:
session.privacy.orderPaymentSuccessful = false;
var status = new Status(Status.ERROR);
status.addDetail(ApplePayHookResult.STATUS_REASON_DETAIL_KEY, ApplePayHookResult.REASON_FAILURE);
return status;
Metadata
Metadata
Assignees
Labels
No labels