-
Notifications
You must be signed in to change notification settings - Fork 16
Sale_Refund
Jacob McConnell edited this page Jun 10, 2014
·
2 revisions
You must specify your API username and password using the Twocheckout.apiusername & Twocheckout.apipassword class variables before calling a method in this class.
##Method
###refund
Use to attempt to issue a full or partial refund. This method can also be called on an invoice or lineitem.
####Arguments
- hash Parameters
- Hash containing refund_invoice parameters. Parameters -> API Refund Invoice
####Returns
Returns result as a TwocheckoutResponse object.
####Example Usage:
HashMap<String, String> params = new HashMap<String, String>();
params.put("comment", "test");
params.put("category", "1");
Sale sale = TwocheckoutSale.retrieve("4774380224");
TwocheckoutResponse result = sale.refund(params);####Example Response (toJson):
{
"response_code" : "OK",
"response_message" : "refund added to invoice"
}Please feel free to contact 2Checkout directly for assistance with your integration.