Jump to content

Payment_method wrong in into ps_order_payment? What file writes into this table?


Recommended Posts

I am trying to find out why my payment module writes the wrong method into the payment_method field.

Can someone tell me what file normally is responsible for populating ps_order_payment? Especially as said it's the payment_method column  that gets a wrong entry.

My circumstance just for clarification: The payment module (official Postfinance Checkout) features multiple sub-payment options (efinance, Card, Twint, Paypal). The payment_module column is getting the name of the module itself (Postfinance Checkout) instead of the payment method chosen (Twint, Paypal, Card). For two of my shop it works correctly, on one it doesn't. Strange, all seem to be identical so far^^

Link to comment
Share on other sites

  • 4 weeks later...

I am in the same situation as you are, this seems to be and old bug from 2015 (from what i read) that is related to "Consider the associated order as validated." option in the backoffice Shop parameters/Order settings/statuses.

I also have a payment module that has multiple payment methods in it, and when i create an invoice or delivery slip, it fetchs the name of the module instead of the payment method because it is using the following line to assign it

$payment->payment_method = $payment_method ? $payment_method->displayName : null;

and that displayName is actually from the module's main PHP file constructor

$this->displayName = $this->l('MyModuleName');

 

the thing about the "Consider the associated order as validated." option, is that if you enable it for both your waiting and paid statuses, it will now pass the correct method name, but i think it causes some trouble for digital products that may become available for download even if not yet payed, there is also a bug the divides the payment in two equal halves of the total, one with the module name and the other with the payment method name.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...