Create a custom payment form

Blank 8/10/2019 02:02 - 8/10/2019 02:02
Developers

The Kademi payments API allows you to submit a request using ajax and returns a JSON object indicating success of failure and containing any validation messages. You can use this in conjunction with the jquery.forms plugin or by building an aajax request directly.

Getting EWay access credentials

  1. Start by registering with EWay - https://myeway.force.com/success/partner-registration
  2. Then follow the instructions here - https://eway.io/api-v3/#authentication - copied below...
  3. Log in to your Partner Portal account using the link below for your country
  4. Navigate to Resources > Sandbox/Testing and click on ‘Request Sandbox’ Note: Skip this step if you already have a Sandbox account

  5. Navigate to the Sandbox using the link below for your country

  6. Go to My Account > User Security > Manage Roles

  7. Create role under name of “API KEY”

  8. Go to My Account > User Security > Create User

  9. Assign API KEY role to new user.

  10. Choose a name (such as API Key) and set the email to something like api@yourdomain.com.au and choose a password.

  11. Once the role is created, click ‘actions’ dropdown menu and click ‘View API Key’

  12. Select the Rapid API Key, the password you set in step 8 is the API password for this key.

Note: Kademi uses the Direct Connection API - https://eway.io/api-v3/#direct-connection

This requires use of EWay's client side encryption or provide a PCI DSS compliance certificate. To use this you must obtain an encryption key from eway

More details here - https://eway.io/api-v3/#client-side-encryption

Kademi EWay Payment API

URL /eway  
     
Parameters    
name The card holder's name Joe Blogs
expiryMonth Two digit month 12
expiryYear Two digit year 23
totalAmount The currency value to be paid 897
currencyCode The currency AUD
number The card number 4444333322221111
cvn The card's CVN number 567
     
Return value JsonResult
{
"data":null,
"fieldMessages":[],
"messages":["Your eWay Payment Created! 
 and the transaction id is:11353475"],
"nextHref":"",
"status":true
}

 

Example form



...

 

Example javascript to post with ajax