There are three code paths that call
Mjwshared.create_payment. Two of them pass
payment_processor_id, the third doesn't.
payment_processor_id isn't passed,
CRM_Contribute_BAO_Contribution::getToFinancialAccount() simply picks the default Asset financial account, which in turns causes the financial transaction to be incorrect.
I'd go a step further and make
payment_processor_id a required parameter of
Mjwshared.create_payment but I thought I'd check with you. It's not called in Stripe or Authnet extensions, but as an API I'm not sure if it's called from anywhere outside of Mjwshared. Even if it is, that's more a reason to delay making it a required field than not doing it at all.