Can i get the merchantid from a paymentmethods config file?
Litium version: 6.2
Can i get the merchantid from a paymentmethods config file?
Litium version: 6.2
I dont know about 6.x but in older versions if you access the payment provider, they have a public method called GetPaymentAccount(paymentMethod) that will give you an object that contains this info.
This is some code from a custom payment provider (Goyada) I have written, but I can see the same method available as public static in Klarna addon for example (although an older version):
var paymentAccount = myProvider.GetPaymentAccount(orderRowInfo[1]);
var merchantId = paymentAccount.MerchantId
and you should be able to access the provider from order payment info… or paymentmethod.provider etc etc… it should be available somewhere
Did it thanks to Martin, hade to rewrite the payment api so I could use merchantid