Testing Payments on Your Forms

Before you go live with your form and start accepting online payments, it's a best practice to test the payment functionality of your form to ensure everything is working as expected.

Testing can be done by using test credit card numbers or a test PayPal account, without using real money.

Enable Test Mode

The first thing you need to do to test the payment functionality of your form is to activate test mode. Go to your payment settings page and turn on the Enable Test Mode option.

This will turn on test mode (also referred to as sandbox mode), and any credit card/PayPal transactions won't go through the actual credit card network.

Depending on the merchant you're using for the form, you'll be prompted to enter some test credentials. Follow the instructions below for more details on how to do testing with a specific merchant.

Testing Payments Using PayPal Standard

Testing payments on PayPal is done by using PayPal Sandbox. The sandbox is basically a self-contained testing environment provided by PayPal, where you can create test accounts and simulate real payments.

To use the sandbox, log in to your PayPal Developer account at https://developer.paypal.com/ using your normal PayPal login info.

Once you're logged in, click the Dashboard menu in the top right corner of the page.

Click Accounts under the Sandbox section.

Two Sandbox accounts will be automatically created for you. These are the accounts you'll use to test the payments.

PayPal will provide you with the following account types:

  • Personal, represents the buyer or sender, in a transaction (e.g. john-buyer@example.com)
  • Business, represents the merchant or receiver, in a transaction (e.g. john-facilitator@example.com)

 

Copy the email address of your Business sandbox account to your MachForm.

Save the settings, and your form is now ready for a test transaction.

Test by filling out your form, and you'll be redirected to PayPal Sandbox page upon completion. On the PayPal Sandbox page, use your Personal sandbox account (e.g. john-buyer@example.com) to make the payment. Check the transaction result by clicking Notifications under your Sandbox accounts list.

Testing Payments Using PayPal Pro

Testing payments using PayPal Pro (REST API) is quite simple. Once you've configured your form with the API keys as instructed on Accepting Payments Using PayPal Pro, you'll only need to use a test credit card number associated with any of your PayPal Sandbox accounts.

Log in to your PayPal Developer account at https://developer.paypal.com/ using your normal PayPal login info.

Once you're logged in, click the Dashboard menu in the top right corner of the page.

Click Accounts under the Sandbox section.

Your sandbox accounts will be displayed. Click the Profile link under the sandbox account you're using.

The account details will be displayed. Click the Funding tab.

You'll see the test credit card number, along with the expiration date. You can use that credit card number to do test payments on your form. You can use any random person's name and any random 3-digit CVV code when testing the card.

The results of the transaction will be displayed on your MachForm entries page and on your PayPal Developer dashboard, particularly under the Transactions section.

Further information can be found on the PayPal Documentation page.

Testing Payments Using Stripe

Testing payments using Stripe is very simple. Once you've configured your form with the Test API Keys as instructed on Accepting Payments Using Stripe, you'll only need to test your form using test credit card numbers.

In test mode, you can use these test cards to simulate a successful transaction:

  • 4242 4242 4242 4242 (Visa)
  • 4012 8888 8888 1881 (Visa)
  • 4000 0566 5566 5556 (Visa, debit)
  • 5555 5555 5555 4444 (MasterCard)
  • 5200 8282 8282 8210 (MasterCard, debit)
  • 5105 1051 0510 5100 (MasterCard, prepaid)

Use any random person's name, any valid future expiration date and any random 3-digit CVV code with the above test numbers.

You can find more test credit card numbers on the Stripe documentation page.

Testing Payments Using Authorize.net

Testing payments on Authorize.net is done by using the sandbox. The sandbox environment is completely separate from the live production environment and requires separate credentials.

You can sign up for a sandbox account at http://developer.authorize.net/hello_world/sandbox/

Once you've registered for a sandbox account, login to your sandbox account at https://sandbox.authorize.net/ and then configure your MachForm with the sandbox API keys using steps similar as those in the instructions on Accepting Payments Using Authorize.net.

Authorize.net Test Card Numbers

You can then test your form using these card numbers:

  • 4007 0000 00027 (Visa)
  • 4012 8888 18888 (Visa)
  • 4111 1111 1111 1111 (Visa)
  • 5424 0000 0000 0015 (MasterCard)
  • 3700 0000 0000 002 (American Express)
  • 6011 0000 0000 0012 (Discover)
  • 3088 0000 0000 0017 (JCB)
  • 3800 0000 0000 06 (Diners Club)

The above test credit card numbers will only work in the sandbox. Use any expiration date after today’s date. If the card code is required, use any 3-digit combination for Visa, Mastercard, Discover, Diners Club, EnRoute, and JCB; use a 4-digit combination for American Express.

You can find more testing information on the Authorize.net documentation page.

Testing Payments Using Braintree

Testing payments on Braintree is done using the sandbox. The sandbox environment is completely separate from the live production environment.

You can log in to your Braintree sandbox account at https://sandbox.braintreegateway.com/login

Then configure your MachForm with the sandbox API keys using steps similar to those in the instructions on Accepting Payments Using Braintree.

Braintree Test Card Numbers

You can then test your form using these card numbers:

  • 4111111111111111 (Visa)
  • 4005519200000004 (Visa)
  • 4009348888881881 (Visa)
  • 378282246310005 (American Express)
  • 371449635398431 (American Express)
  • 6011111111111117 (Discover)
  • 3530111333300000 (JCB)
  • 5555555555554444 (MasterCard)

You can find more detailed information on the Braintree documentation page.

Going Live with Your Form

Once you've finished testing your form under test mode, go live by turning off the Enable Test Mode option.

It's very important to uncheck Enable Test Mode when you are ready to go live. If you forget to turn off this option, your form won't charge any real payments even when your customers are using real credit cards.

0 Comments

Add your comment

E-Mail me when someone replies to this comment