This application provides examples of how to use the Authorize.Net Accept products to integrate secure payment acceptance into your applications.
- Clone or download this repo
- Host the sample app in any web server supporting PHP like IIS (with PHP) or XAMPP (Apache web server with PHP). HTTPS (SSL) must be enabled for your website.
- Set your authentication values by setting the ENVIRONMENT variables API_LOGIN_ID and TRANSACTION_KEY. For example, in httpd.conf:
SetEnv API_LOGIN_ID your_id
SetEnv TRANSACTION_KEY your_key
For IIS, you could set these in FastCGI Settings -> Environment Variables
- Update acceptJSCaller.js's function, acceptJSCaller(), with your authentication values (clientKey, apiLoginID)
- Browse the application (index.php) over HTTPS connection.
- To "login" use an existing customer profile ID or create a new one (http://developer.authorize.net/api/reference/index.html#customer-profiles-create-customer-profile)
- Payment forms are shown in the same page and Shipping forms are handled in a separate modal popup. Any of the types can be chosen to display the forms.
Accept Customer is the new name for Hosted CIM, part of our Customer Profiles API
The sample application shows how to:
- Incorporate the Manage Customer hosted page into your application (Profiles tab).
- Embed the hosted "Add/Edit Payment" page into your application as an iFrame (Payments tab).
- Pop up the hosted "Add/Edit Shipping" page in a light-box mode (Shipping tab).
Accept.js is a new integration option which allows you to leverage the full power of the Authorize.Net API while avoiding the PCI burden of credit card information hitting your servers. See our developer documentation for more details.
The sample application shows how to:
- Incorporate the Accept.js library into your existing payment flow (Home page, PAY button)
Accept Hosted provides a fully hosted payment transaction solution, Authorize.Net takes care of the payment form, the transaction itself and (optionally) the receipt generation. You can host this page in an embedded iFrame, lightbox style popup or a full page redirect. See our developer documentation for more details.
The sample application shows how to:
- Request an Accept Hosted form token using the Authorize.Net API (GetHostedPaymentForm)
- Incorporate Accept Hosted into your existing payment flow (Home page, Hosted Pay button)
- Display a custom receipt using the transaction response.
Authorize.Net supports Apple Pay on the Web in addition to our in-app Apple Pay Support.
In this sample we demonstrate how to:
- Integrate with the ApplePay.js library
- Validate your merchant identity from your server.
- Complete the transaction by passing the Apple Pay payment data in the Authorize.Net createTransaction API.
Please note that you will need to have a merchant ID set up with Apple as described in the Apple Pay documentation https://developer.apple.com/reference/applepayjs/