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


i have many subscription in auth.net subscription works 30 day time duration , run 60 months.

i have several operation such email , update db related , amount change kind of many operation have perform when subscription made.

currently made cron job there long , complex process code.

so research on found auth.net use silent post url.

but have tried in sandbox account not works. , not sure works when subscription deduct money on card?

what silent post url , it's works or not ?

i posting answer on basis of comments , research.

ipn , silent post url same things.

  • silent post url not working on test account need use live account necessary.
  • silent post url call when payment deduct. doesn't matter payment arb or simple.
  • you can enter 1 silent post url use url every payment of auth.net
  • payment deduct auth.net next approx 2 @ morning can use cron job also.

silent post url how test.

testing silent post 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 post name can in silent post file.

description test:-

  • make 1 form on directory of project , put above code.
  • change action url of form silent post url file there need code in future live.
  • there can print data how receive , name of post data.

    echo "<pre>"; print_r($_request); echo "</pre>"; die(); 
  • print array , see testing data.

hope answer understand silent post url.

thanks.


Comments