Check Opportunity Updatability Before Payment

When paying for an invoice that was created from an opportunity, sometimes we wanted to do some update on the opportunity after payment. In some cases we may also have put validation rules on the opportunity that will cause the update to fail.

When the above happens, the payment probably already happened at the processor level but because of the validation rule, the payment was not recorded in Salesforce. Thus an issue with payment successful at the processor level, but not in Salesforce.

To catch these scenarios, there is a flag that can simulate an update on the opportunity before payment. If the opportunity is updated successfully, then it probably passed the validation rules, and the payment can proceed. If the update failed, payment is halted until the issue with the opportunity is resolved.

The flag can be found in Payment Center Settings, and is called Update Check Opportunity Before Payment (it’s probably hidden from the page so you may have to update your layout to expose the field). Tick this box to do an update before payment.

If you have enabled online payments, also ensure that your Sites user has Read access to opportunities. To do this, go to Setup | Sites, then click on your site. At the page that comes up, go to Public Access Settings. Under object permissions, ensure that Read access is ticked for Opportunities object.