Define return parameters for doPayment
We need to clearly define what the return parameters for
doPayment() should be as it's important, it's unclear and it's not defined anywhere.
doPayment($params)returns an array.
- It must contain:
payment_status_id: (deprecated) Numeric value of
Contribution Statusoption value Completed or Pending. Eg. 1. Must be set but make sure you set
payment_statusas well because this value will be ignored in the future.
payment_status: Text field - Either
- It may contain (and the code that calls
doPayment()will update these values on the contribution/payment:
trxn_id: The transaction ID from the payment processor. This will be recorded in the
Contribution.trxn_idfield and the
Payment.trxn_idfield. We do not return
order_referencehere because that is usually filled in by an IPN callback from the payment processor if required.
fee_amount: The amount (in same currency as contribution) of the fee taken by the payment processor for processing the payment.
$params was passed by reference. This is deprecated and only the return values should be used.