I would suggest you to take a look on current implementation for Stripe or Braintree. I believe that there is an interface that must be implemented. You may try out Cashier and write your implementation for that and then swap it.
In other hand if that don`t work you can take a look on cashier https://github.com/laravel/cashier and braintree cashier https://github.com/laravel/cashier-braintree and see how they are implemented.
Put the logic together and write your own. I might suggest you to just oversee what you really need because almost every payment system offer standalone libraries. You may use them as well and if needed mix them together if you need.
It always depends on what you really need. Because sometimes when you think you need one really you need something else. Explaining what you want to build will get you more information about how to do that.