I was recently helping out a non-profit company where they were using Square as their payment gateway. We had setup Woocommerce for selling tickets to their benefits. We decided to add a donation form as well. We found the WordPress Give Plugin. It is a fantastic plugin and supported a few other payment gateways some of which are paid versions at a reasonable cost. The client needed a payment gateway for the Give Plugin using the Square merchant account. Thankfully the Give Plugin has a nice hook system that makes developing a custom gateway fairly easy after figuring out all of the hooks. They are not documented on their site.
You can download the plugin on my github repo.
Instructions for installing the plugin can be found in the README file on the repo page.