• No results found

Default Payment Validation Process

The PCM_OP_PYMT_POL_VALIDATE_PAYMENT policy opcode processes payments in three phases:

1. Payment suspense phase: Receives a list of payments from PCM_OP_PYMT_ VALIDATE_PAYMENT and checks the /config/business_params object to determine whether Payment Suspense Manager is enabled. If so, it checks the payments to determine whether any payments must be suspended and updates the PIN_FLD_STATUS field accordingly.

2. Failed unconfirmed payment phase: For all payments with a PIN_FLD_STATUS in the failed range, uses the payment method value to determine whether a failed payment has an associated unconfirmed successful payment or if it is a failed confirmed payment.

The input flist contains the POID of the original payment item, the transaction ID, and the amount of the original payment to properly handle unconfirmed failed payments.

3. Write-off reversal phase: Checks the /config/business_params object to determine whether automatic write-off reversals are enabled. If so, it determines whether the payment is for an account, bill, or bill item that has been written off. If so, it sets PIN_FLD_STATUS accordingly.

See "About Payment Status" for information on PIN_FLD_STATUS values and ranges. Payment Suspense Phase

In this phase, the PCM_OP_PYMT_POL_VALIDATE_PAYMENT policy opcode first checks the PIN_FLD_STATUS field to determine whether the payment has a status in the suspense range, indicating that the payment has already been marked for

suspense. In this case, the opcode passes the output flist and associated status back to PCM_OP_PYMT_VALIDATE_PAYMENT. BRM will then use PCM_OP_PYMT_ COLLECT to direct the payment to the payment suspense account.

If the payment is not already marked for suspense, the PCM_OP_PYMT_POL_ VALIDATE_PAYMENT policy opcode does the following:

1. Validates the account number specified by the PIN_FLD_ACCOUNT_NO or PIN_ FLD_ACCOUNT_OBJ field in the input flist or searches for the corresponding account POID.

2. Validates the bill number specified by the PIN_FLD_BILL_NO field in the input flist and searches for the corresponding bill POID, /billinfo POID, and account POID.

3. If neither a bill POID nor a bill number was submitted with the payment, BRM uses the bill amount to find the bill.

If the account and bill numbers supplied in the input flist are both invalid or the PCM_OP_PYMT_POL_VALIDATE_PAYMENT policy opcode cannot find the account or bill POIDs (or bill amount), it marks the payment for suspense. It also compares the account POID from the /bill object with the account POID found in step 1. If they do not match, the opcode marks the payment for suspense.

About Customizing Payment Suspense Manager

4. Checks the PIN_FLD_STATUS field in the /account object to determine whether the account is closed. If the account is closed, the PCM_OP_PYMT_POL_ VALIDATE_PAYMENT policy opcode marks the payment for suspense.

5. Checks any custom validation criteria and marks the payment for suspense if appropriate.

6. Writes the status of the payment in the PIN_FLD_STATUS field, and includes this field in the output flist. If the payment must be suspended, it sets this field to one of the values in the suspense range, as appropriate.

Failed Unconfirmed Payments Phase

In this phase, the opcode considers only payments whose status is marked as failed: those whose PIN_FLD_STATUS value is in the financially failed range. These payments are ones that the opcode was able to validate, but were marked by the payment processor as failing for financial reasons. In default implementations, the opcode requires the transaction ID and result of each payment to prepare the failed unconfirmed payments for reversal.

If the failed payment is an unconfirmed payment, PCM_OP_PYMT_VALIDATE_ PAYMENT:

1. Searches the /event/billing/payment object for an unconfirmed payment with the transaction ID passed in with the failed payment.

2. Does one of the following:

■ If an unconfirmed payment is found, sets PIN_FLD_RESULT to PIN_PAY_

TYPE_SUCCESS.

■ If the transaction ID of the unconfirmed payment is not found, it checks the

/config/business_params object to determine whether Payment Suspense Manager is enabled.

If so, it sets PIN_FLD_STATUS to PIN_FLD_FAILED_SUSPENSE and BRM posts the payment to the payment suspense account.

If not, it sets PIN_FLD_RESULT to PIN_FLD_PAYMENT_RESULT_FAIL, and a reversal does not occur. The subsequent steps do not occur and manual allocation is required.

3. Loads the following unconfirmed payment information from the

/event/billing/payment storable class into the PIN_FLD_FAILED_PAYMENT_FEE substruct in the PIN_FLD_EXTENDED_INFO substruct of the output flist:

■ Payment channel ID

Note:

■ When an /event/billing object is created for a suspended

payment, it stores the original reason code associated with a failed payment that has been flagged for suspense. This ensures that the reason initially associated with the failed payment is not lost if BRM places the payment in suspense.

■ When the /event/billing/payment object is created, it stores the

original account number provided for the payment being suspended, the original bill number, and the original transaction ID.

About Customizing Payment Suspense Manager

■ Payment method

■ Transaction ID

■ Original payment amount

■ Customer segment

4. Passes the POID of the successful unconfirmed payment in the output flist to PCM_OP_BILL_REVERSE_PAYMENT so it can be reversed.

The output flist sends the array of reversal events and tax events (if created) that were passed in by the PCM_OP_AR_WRITEOFF_REVERSAL opcode.

Write-off Reversal Phase

In this phase, PCM_OP_PYMT_VALIDATE_PAYMENT considers only payments whose status is marked as successful: those whose PIN_FLD_STATUS value is in the successful range. The opcode determines which of these payments is for an account, bill, or bill item that has been written off. It performs the following operations:

■ Checks the /config/business_params object to determine if automatic write-off

reversal functionality for payment processing is enabled.

■ If this is enabled, checks the /profile/writeoff object to verify that the write-off flag

is set for the account.

■ If both checks are successful, sets the PIN_FLD_STATUS field in the output flist to

PIN_PYMT_WRITEOFF_SUCCESS.