Comment to Hard coded payment options in Stripe
-
$aSession variable contains the array and therefore, the former hardcoded array in class 'BxPaymentProviderStripeV3.php' has now to be substituted by the new variable, am I right?
Hello. Yes, the default array will be overwritten with the new one which is returned to $oAlert->aExtras['session_params']
$oAlert->aExtras['session_params'] = $aSession;It happens because this part of alert's aExtras array was passed by referrence in BxPaymentProviderStripeV3::_createSession method.
bx_alert($this->_oModule->_oConfig->getName(), $this->_sName . '_create_session', 0, false, array( 'session_object' => &$oSession, 'session_params' => &$aSession ));-
Now, that I set BxPaymentProviderStripeV3.php back to its original version, everything works like a charm! It's really magic. 🙌
When does the lesson "Extending the module with putting data into the array by using Studio settings" start? 😉
Hello. If you just want to control items of 'payment_method_types' parameter view Settings then it wouldn't be a problem. I mean to have a Dropdown with Card, Sofort and Sepa Debit choices.
-
How about a comma-separated list of arguments to fill the array with, individually? Of corse, the user will be responsible to configure his payment methods in Stripe accordingly.
-