See articles -
https://devs.x-cart.com/
It is however really bad practice to charge customers more just because they choose one payment method or another. The CC or PP processing fee is part of the cost of doing business. Don't push it down to your customers. Don't penalize the customers for something that you should incorporate in your products or services to begin with.