Skip to content

handle null balance trxn id when calculating fees

JonGold requested to merge JonGold/stripe:null-balance-trxn into master

I had an invoice that is a pro-rated refund of a recurring payment. When I run the Stripe.retryall API, this crashes in CRM_Core_Payment_StripeIPN::setInfo() because we try to set a fee when the $balanceTransactionID is NULL. Since CRM_Core_Payment_Stripe::getFeeFromBalanceTransaction() is clearly set up to handle this scenario (based on the docblock and the if statement) I've changed the function signature to allow a NULL value.

Merge request reports