<brad-oyler/>

13
August

WePay API now has a C# SDK and MVC examples

  As you may or may not know, I like to move money. I’ve been dealing with the likes of PayPal for almost a decade and more recently Amazon “flexible” payments and have been conditioned to just live with their “kind” of customer service. I’ve also tried some smaller payment processors and most didn’t have a flexible approach to payments that I needed.

  A little while ago I was forced to find an alternative. A colleague suggested WEPAY, which I glanced over about a year ago, and I’m not sure why. Long story, short. It is a pretty awesome API\service for building payment platforms\marketplaces.

  Unfortunately, WePay did not have a SDK for asp.net, so I whipped one up last week. You can see source for SDK and examples in ASP.Net MVC on GitHub here: http://github.com/bradoyler/WePayASPNet

Here’s a small snippet for creating a checkout.


    
 public CheckoutCreateResponse Create(CheckoutCreateRequest req)
        {
            CheckoutCreateResponse response;
            try
            {
                response = new WePayClient().Invoke<CheckoutCreateRequest, CheckoutCreateResponse>(req, req.actionUrl,req.accessToken);
            }
            catch (WePayException ex)
            {
                response = new CheckoutCreateResponse { checkout_id = 0, checkout_uri =req.redirect_uri+"?error="+ex.error, Error =ex };
            }
 
            return response;
        }

There’s obviously more to it, so read the API docs here: https://www.wepay.com/developer/reference

Also, I have the examples hosted at http://wepay.apphb.com (for the time-being)

The list of supported WePay SDKa are available here: https://www.wepay.com/developer/plugins

Cheers.