-
Notifications
You must be signed in to change notification settings - Fork 69
Sale_Refund
Jacob McConnell edited this page Jun 10, 2014
·
2 revisions
The Twocheckout_Sale class provides methods to retrieve and update sales and will return an Array or JSON response depending on your format specification.
##Method
###refund
Use to attempt to issue a full or partial refund.
####Arguments
- array Array
- Array containing refund_invoice or refund_lineitem parameters in key => value pairs. Parameters -> API Refund Invoice || API Refund Lineitem
####Returns
Returns result as a JSON object or array depending on your specification.
####Example Usage:
Twocheckout::username('APIuser1817037');
Twocheckout::password('APIpass1817037');
$args = array(
'sale_id' => 4753371371,
'category' => 1,
'comment' => 'Order never sent.'
);
$result = Twocheckout_Sale::refund($args);
####Example Response:
Array
(
[response_code] => OK
[response_message] => refund added to invoice
)
Please feel free to contact 2Checkout directly for assistance with your integration.