This question is an exact duplicate of:
I know this is a duplicate question (13) The merchant login ID or password is invalid or the account is inactive.(usig Aim method for authorize.net) but this answer does not solved my problem. Let me explain.
Authorize.Net implements AcceptJs to receive opaqueData
. I have successfully tested the opaqueData and receive the dataDescriptor
and dataValue
. (token)
Now, I want to accept the payment through Authorize.net. From this guide https://developer.authorize.net/api/reference/features/acceptjs.html#response-handling I want to implement the accept payment method through PHP. Here is my code:
$url = "https://test.authorize.net/gateway/transact.dll";
$query = <<<EOT
<createTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>API_LOGIN_ID</name>
<transactionKey>API_TRANSACTION_KEY</transactionKey>
</merchantAuthentication>
<transactionRequest>
<transactionType>authCaptureTransaction</transactionType>
<amount>10</amount>
<payment>
<opaqueData>
<dataDescriptor>COMMON.ACCEPT.INAPP.PAYMENT</dataDescriptor>
<dataValue>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</dataValue>
</opaqueData>
</payment>
</transactionRequest>
</createTransactionRequest>
EOT;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml'));
curl_setopt($ch, CURLOPT_POSTFIELDS, "$query");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);
print_r($output);
It showed me the error:
(13) The merchant login ID or password is invalid or the account is inactive.
I checked that my Authorize.net test mode
is ON. Also, I double verified that I have entered the correct credentials. What are the issues then?
PS: I'm testing this via localhost with https (in ubuntu server).
</div>