Skip to content

Instantly share code, notes, and snippets.

@ginkgomzd
Last active September 10, 2018 22:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ginkgomzd/6434ed4a8d0eaa32f0303b964fa7c955 to your computer and use it in GitHub Desktop.
Save ginkgomzd/6434ed4a8d0eaa32f0303b964fa7c955 to your computer and use it in GitHub Desktop.
cURL script that can be used to confirm the Silect-Post URL to configure in your Authorize.net account.
#!/bin/bash
# for development, you can go bare-metal with this URL:
# no payment processor ID necessary:
# THE_URL=http://awesome.org/sites/all/modules/civicrm/extern/authorizeIPN.php
# Confirm the URL to use in the Authorize.net Silent-Post URL:
# last URL segment is the payment processor ID
THE_URL="https://awesome.org/civicrm/payment/ipn/1"
X_AMOUNT="5.00"
X_CUST_ID="3430" # cvicrm contact id
X_INVOICE_NUM="6692" # civicrm contribution id
X_SUBSCRIPTION_ID="40018319"
X_TRANS_ID="40926580513" # x_trans_id is a unique number that authorize.net returns to identify this transaction
curl $THE_URL -d x_response_code=1 \
-d x_subscription_id=$X_SUBSCRIPTION_ID \
-d x_cust_id=$X_CUST_ID \
-d x_amount=$X_AMOUNT \
-d x_invoice_num=$X_INVOICE_NUM \
-d x_trans_id=$X_TRANS_ID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment