Payment gateway library
Olvio Ecommerce for Authorize.NET is a free library that you can use for .NET projects (VB and C #) to access an authorized .NET Gateway. I've used it myself, and while it's a bit outdated, I'm still happy with how this product works.
source to share
Braintree is open source .NET Library . This is specific to Braintree, though, so it won't work with other payment gateways.
source to share
I have worked with this E-Payment Integrator which supports nearly 70 gateways. The trial version is free.
However, since there is no free lunch, you must purchase the full version. http://www.nsoftware.com/ibiz/epayment/
source to share
You will get the source code for any gateway for any platform in the help / documentation / download sections on the payment gateway / payment processor site. Compile these codes and post them to codeplex.com. This will be the open source project you want ...
And remember to update your code regularly, as APIs for payment gateways change frequently for security measures ...
source to share