Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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