I am using the Blackbaud Checkout form which returns a token that is used to finalize the transaction.
var data = new donation_data
{
amount = (int)Math.Round(model.Cart.TotalAmount * 100),
authorization_token = transactiontoken
};
var body = JsonConvert.SerializeObject(data);
Above C# code is the body I used to finalize the transaction for Card Not Present transaction. The requestUri to finalize is “payments/v1/checkout/transaction”. It works fine.
What is the body format that is used for Store Card Info transaction?
I changed the transaction_type to ‘store_card_info’ in the parameter that is passed to Blackbaud_Init() in JavaScript and changed the requestUri to ‘payments/v1/cardtokens’ for finalizing. When I use following body:
var body = JsonConvert.SerializeObject(new
{
card_token = Guid.NewGuid().ToString(),
authorization_token = transactiontoken
});
to finalize the transaction, it gives me the error: the body was not in the correct format.
Thanks!
Tiehu Jiang