Skip to content

Instantly share code, notes, and snippets.

@bradoyler
Created August 13, 2012 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bradoyler/3343950 to your computer and use it in GitHub Desktop.
Save bradoyler/3343950 to your computer and use it in GitHub Desktop.
example for creating a wepay checkout using the WePay SDK (C#)
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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment