Details
-
Type: Patch
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.6
-
Fix Version/s: 4.6.1
-
Component/s: None
-
Labels:None
-
Documentation Required?:Developer Doc
Description
Tim,
further to our brief IRC chat - I want to be able to alter the payment processor credentials via hook. In theory the use case 'could' involve changing class - although in my case it doesn't.
Basically donations go to a different account to other payments and the way they get there is by going to a different payment gateway (of the same type ie. eway with different credentials).
At the moment the $paymentProcessor->_processor is a protected param and there is no setter. There is a general getVar getter (I'm not a fan of that & would prefer to add a specific getter but not religious on it either).
So, do I add a setter? Or, given that conceivably the same requirement could involve 2 different processor classes do I pass the object to the hook by params & then replace it if I need the credentials (as I would have to if I was changing from IATS to Paypal)
Please advise & I'll implement
Thanks