Result of a hook handling an Apple Pay request.
Use the constants in this type to indicate specific error reasons to be provided to Apple Pay JS. For example, the following code creates a Status that indicates the shipping contact information provided by Apple Pay is invalid:
var ApplePayHookResult = require('dw/extensions/applepay/ApplePayHookResult'); var Status = require('dw/system/Status'); var error = new Status(Status.ERROR); error.addDetail(ApplePayHookResult.STATUS_REASON_DETAIL_KEY, ApplePayHookResult.REASON_SHIPPING_CONTACT);
If a specific error reason is not provided, the generic Apple Pay STATUS_FAILURE
reason will be used when necessary.