Search code examples
phpauthorize.netauthorize.net-arb

How can call file like ipn in ARB subscription when deduct payment. in Authorized .net?


I have many subscription in Auth.net all the subscription works as the 30 day time duration and that all the run for the 60 months.

I have several operation such as the email and update my db related and amount change kind of many operation I have to perform when any subscription is made.

Currently I am made it for cron job but there was very long and complex process to do code.

So research on that I found the auth.net something use like the Silent post url.

but I have tried in my sandbox account but it not works. and I am not sure about that this is works when subscription deduct money on the card?

What is silent post url and it's works or not ?


Solution

  • I am posting an answer on basis of the comments and research.

    IPN and silent post URL are same things.

    • Silent post URL are not working on test account you need to use live account necessary.
    • Silent post URL are always call when payment deduct. that doesn't matter that payment are for the ARB or simple.
    • You can enter only one silent post URL they are use that url every payment of the auth.net
    • payment deduct by auth.net next approx 2 am at the morning so you can use cron job also.

    Silent Post Url how to test.

    Testing Silent Post with Authorize.net

    <form action="http://www.yourdomain.com/silent-post.php" method="post">
    <input type="hidden" name="x_response_code" value="1"/>
    <input type="hidden" name="x_response_subcode" value="1"/>
    <input type="hidden" name="x_response_reason_code" value="1"/>
    <input type="hidden" name="x_response_reason_text" value="This transaction has been approved."/>
    <input type="hidden" name="x_auth_code" value=""/>
    <input type="hidden" name="x_avs_code" value="P"/>
    <input type="hidden" name="x_trans_id" value="1821199455"/>
    <input type="hidden" name="x_invoice_num" value=""/>
    <input type="hidden" name="x_description" value=""/>
    <input type="hidden" name="x_amount" value="9.95"/>
    <input type="hidden" name="x_method" value="CC"/>
    <input type="hidden" name="x_type" value="auth_capture"/>
    <input type="hidden" name="x_cust_id" value="1"/>
    <input type="hidden" name="x_first_name" value="John"/>
    <input type="hidden" name="x_last_name" value="Smith"/>
    <input type="hidden" name="x_company" value=""/>
    <input type="hidden" name="x_address" value=""/>
    <input type="hidden" name="x_city" value=""/>
    <input type="hidden" name="x_state" value=""/>
    <input type="hidden" name="x_zip" value=""/>
    <input type="hidden" name="x_country" value=""/>
    <input type="hidden" name="x_phone" value=""/>
    <input type="hidden" name="x_fax" value=""/>
    <input type="hidden" name="x_email" value=""/>
    <input type="hidden" name="x_ship_to_first_name" value=""/>
    <input type="hidden" name="x_ship_to_last_name" value=""/>
    <input type="hidden" name="x_ship_to_company" value=""/>
    <input type="hidden" name="x_ship_to_address" value=""/>
    <input type="hidden" name="x_ship_to_city" value=""/>
    <input type="hidden" name="x_ship_to_state" value=""/>
    <input type="hidden" name="x_ship_to_zip" value=""/>
    <input type="hidden" name="x_ship_to_country" value=""/>
    <input type="hidden" name="x_tax" value="0.0000"/>
    <input type="hidden" name="x_duty" value="0.0000"/>
    <input type="hidden" name="x_freight" value="0.0000"/>
    <input type="hidden" name="x_tax_exempt" value="FALSE"/>
    <input type="hidden" name="x_po_num" value=""/>
    <input type="hidden" name="x_MD5_Hash" value="A375D35004547A91EE3B7AFA40B1E727"/>
    <input type="hidden" name="x_cavv_response" value=""/>
    <input type="hidden" name="x_test_request" value="false"/>
    <input type="hidden" name="x_subscription_id" value="365314"/>
    <input type="hidden" name="x_subscription_paynum" value="1"/>
    <input type="submit"/>
    

    This kind of the post name you can get in the your silent post file.

    description for test:-

    • make one form on the your directory of the project and put above code.
    • change action url of the form where is actually your Silent post Url file there you need to code in future for the live.
    • there you can print the data how you receive and get name of the post data.

      echo "<pre>";
      print_r($_REQUEST);
      echo "</pre>";
      die();
      
    • print array and see the testing data.

    Hope that answer will help to understand silent post url.

    Thanks.