- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Refund transcation for CIM
Hi
I am trying the following code to refund a transaction. The CustomerProfileID, PaymentProfileID and TransactionID all have values for the transaction I have just authorized.
I get the error E00014 : customerProfileId and customerPaymentProfileId OR creditCardNumberMasked OR bankRoutingNumberMasked and bankAccountNumberMasked are required.
CIMSOAPAPIUtilities.MerchantAuthentication.name = UserName;
CIMSOAPAPIUtilities.MerchantAuthentication.transactionKey = Key;
ProfileTransRefundType refund = new ProfileTransRefundType();
refund.customerProfileId = profile_id;
refund.customerPaymentProfileId = payment_profile_id;
//refund.creditCardNumberMasked = "XXXX"+last4DigitCC;
refund.amount = RefundAmount;
refund.transId = transactionId;
ProfileTransactionType trans = new ProfileTransactionType();
trans.Item = refund;
CreateCustomerProfileTransactionResponseType response = CIMSOAPAPIUtilities.Service.CreateCustomerProfileTransaction(CIMSOAPAPIUtilities.MerchantAuthentication, trans, null);
return new CIMAuthorizationDotNetServices(response.directResponse.ToString());
If I go ahead and add in the XXXX1111 card number then I get this
3,2,54,The referenced transaction does not meet the criteria for issuing a credit.,,P,0,,,1.00,CC,credit,12129,egb test test,test,,2300 gree dr,Vally city,oh,44123,,,,,,,,,,,,,,,,,,E6D5A707CFEC84A00919AE1F9E4049ED,,,,,,,,,,,,,XXXX1111,Visa,,,,,,,,,,,,,,,,
My guess is ,I am getting this error because I am trying to refund a transaction that is not finalized yet. However I am connected to developer environment. Is this true in the developer environment too.
Any help is grately appriciated.
12-20-2010 12:42 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That worked perfectly, thanks TJPride.
02-25-2012 12:10 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had the exact same scenario. Setting the following worked:
AuthorizeNetWebService.ProfileTransRefundType refund = new AuthorizeNetWebService.ProfileTransRefundType();
refund.customerProfileId = cimProfileId;
refund.customerPaymentProfileId = cimPaymentProfileId;
refund.transId = transactionId;
refund.amount = amount;
refund.customerProfileIdSpecified = true;
refund.customerPaymentProfileIdSpecified = true;
06-10-2013 05:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i'm sorry; i do not think that is true. in the CIM XML guide, there are no elements called:
- customerProfileIdSpecified
- customerPaymentProfileIdSpecified
you may be using another authorize.net API but not CIM as far as i can tell. i did try it and got the:
- The element 'profileTransRefund' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'customerProfileIdSpecified'
it seems like the only way to issue a refund transaction greater than 120 days is to fill out the ECC form. at least as far as i can tell. i have done plenty of refund transactions less than 120 days w/o issue.
06-26-2015 03:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am facing same issue in the authorize.net(CIM).
We have passed required parameters for refund transactions.
We have set the requested variables in the authorize.net transactions.
$transaction = new AuthorizeNetTransaction;
$transaction->customerProfileId = $customer_profile_id;
$transaction->customerPaymentProfileId =$auth_customer_payment_profile_id;
$transaction->order->invoiceNumber =$invoice_id;
$transaction->order->description=$desc;
$response=$sendreq->createCustomerProfileTransaction("Refund",$transaction,'x_duplicate_window=0');
//////////////////// REQUESTED TRANSACTIONS ARRAY /////////////////////////////////////////////////
AuthorizeNetTransaction Object ( [amount] => 140.00 [tax] => stdClass Object ( [amount] => [name] => [description] => ) [shipping] => stdClass Object ( [amount] => [name] => [description] => ) [duty] => stdClass Object ( [amount] => [name] => [description] => ) [lineItems] => Array ( ) [customerProfileId] => 78987884 [customerPaymentProfileId] => 15987459 [customerShippingAddressId] => [creditCardNumberMasked] => [bankRoutingNumberMasked] => [bankAccountNumberMasked] => [order] => stdClass Object ( [invoiceNumber] => 11077 [description] => Register from - website [purchaseOrderNumber] => ) [taxExempt] => [recurringBilling] => [cardCode] => [splitTenderId] => [approvalCode] => [transId] => 2239407521 )
///////////////////////////////////// TRANSACTION RESPONSE ///////////////////////////////////////////////
AuthorizeNetCIM_Response Object
(
[xml] => SimpleXMLElement Object
(
[messages] => SimpleXMLElement Object
(
[resultCode] => Error
[message] => SimpleXMLElement Object
(
[code] => E00027
[text] => The referenced transaction does not meet the criteria for issuing a credit.
)
)
[directResponse] => 3,2,54,The referenced transaction does not meet the criteria for issuing a credit.,,P,0,11077,Register from - website,140.00,CC,credit,127165,User,lastname,,test,test,AK,1545,US,5465,,test25@test.com,,,,,,,,,,,,,,FDE63CE0C30ED433BFD18C86A21F69E7,,,,,,,,,,,,,XXXX4242,Visa,,,,,,,,,,,,,,,,
)
[response] => 3,2,54,The referenced transaction does not meet the criteria for issuing a credit.,,P,0,11077,Register from - website,140.00,CC,credit,127165,User,lastname,,test,test,AK,1545,US,5465,,test25@test.com,,,,,,,,,,,,,,FDE63CE0C30ED433BFD18C86A21F69E7,,,,,,,,,,,,,XXXX4242,Visa,,,,,,,,,,,,,,,,
[xpath_xml] => SimpleXMLElement Object
(
[messages] => SimpleXMLElement Object
(
[resultCode] => Error
[message] => SimpleXMLElement Object
(
[code] => E00027
[text] => The referenced transaction does not meet the criteria for issuing a credit.
)
)
[directResponse] =>3,2,54,The referenced transaction does not meet the criteria for issuing a credit.,,P,0,11077,Register from - website,140.00,CC,credit,127165,User,lastname,,test,test,AK,1545,US,5465,,test25@test.com,,,,,,,,,,,,,,FDE63CE0C30ED433BFD18C86A21F69E7,,,,,,,,,,,,,XXXX4242,Visa,,,,,,,,,,,,,,,,
)
)
I have passed all required parameters for the REFUND process & i also check that in authorize.net that transaction is already setteled. and it passed almost 18 hours but still i got respone "
The referenced transaction does not meet the criteria for issuing a credit
Please let me know if any thing found wrong in request paramter.
Thanks in advance.
09-03-2015 10:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @testing
Response code 54:
The referenced transaction does not meet the criteria for issuing a credit. It may be unsettled, an invalid type, the wrong currency, an invalid reference transaction ID or settled more than 120 days ago.
Richard
09-04-2015 08:38 AM - edited 09-04-2015 08:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i am using this code to refund CIM transaction. But get an error. Credit card number is required.
Can any tell what is wrong with my code?
public ANetApiResponse RefundTransaction(String ApiLoginID, String ApiTransactionKey, decimal TransactionAmount, string TransactionID)
{
Console.WriteLine("Refund Transaction");
ApiOperationBase<ANetApiRequest, ANetApiResponse>.RunEnvironment = AuthorizeNet.Environment.SANDBOX;
// define the merchant information (authentication / transaction id)
ApiOperationBase<ANetApiRequest, ANetApiResponse>.MerchantAuthentication = new merchantAuthenticationType()
{
name = ApiLoginID,
ItemElementName = ItemChoiceType.transactionKey,
Item = ApiTransactionKey
};
var transactionRequest = new transactionRequestType
{
transactionType = transactionTypeEnum.refundTransaction.ToString(),
amount = TransactionAmount,
refTransId = TransactionID
};
var request = new createTransactionRequest { transactionRequest = transactionRequest };
// instantiate the contoller that will call the service
var controller = new createTransactionController(request);
controller.Execute();
// get the response from the service (errors contained if any)
var response = controller.GetApiResponse();
//validate
if (response != null && response.messages.resultCode == messageTypeEnum.Ok)
{
if (response.transactionResponse != null)
{
Console.WriteLine("Success, Auth Code : " + response.transactionResponse.authCode);
}
}
else if (response != null)
{
Console.WriteLine("Error: " + response.messages.message[0].code + " " + response.messages.message[0].text);
if (response.transactionResponse != null)
{
Console.WriteLine("Transaction Error : " + response.transactionResponse.errors[0].errorCode + " " + response.transactionResponse.errors[0].errorText);
}
}
return response;
}
08-05-2016 06:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @saadch8811
It doesn't appear you're including the card expiration date, which can be set to "XXXX" if you do not have it handy.
Richard
08-05-2016 07:57 AM
- « Previous
-
- 1
- 2
- Next »