Opening The Widget
Note: If you need to Open the widget with dynamic Content you will need to do some programming. This is also true if you need to get real time posts after the widget is completed. If you simply need a widget for users to submit payments and need no dynamic content or real time postings then we can simply provide you a URL to place in your product.
Basically, you will construct the string which has the following:
?Key=Here you need to enter your EasyPay credentials (Account Code and Token separated by the | symbol)
&inputs=Here you add parameters which can prepopulate the widget with values as well as direct us where to post the results.
Input Parameters
MERCHID: Here you will provide an integer which represents one of your merchant records. Each EasyPay account can have one or more merchant records ( or cost centers ) which they can direct funds to. You will get this info from EasyPay when you Board a new account.
REFID: Here you can send any Unique Identifier to describe this particular cardholder or transaction which we will store in our database. You can then query our database at a later time to find these records based on this reference ID.
FIRSTNAME: ( optional )
LASTNAME: ( optional )
ADDRESS1: ( optional )
ADDRESS2: ( optional )
CITY: ( optional )
STATE: ( optional )
ZIP: ( optional )
AMOUNT: Depending on which type of widget this is ( Instant Payment or Stored card ) this may be appropriate.
WTYPE: This is a required field which tells us which widget to open. EasyPay will provide this info.
REDIRECT: You can specify a URL where we can POST the results of the widget submission. If you are storing a Card On File we will provide info such as a CONSENTID which will allow you to charge this card at a later time. If you are simply collecting a payment, we will provide the transaction ID so that you may later do operations such as CREDIT / VOID etc.
Once you have developed your string manifest you will now need to ENCRYPT this string in one of the following encryption Types:
- AES 256
In all cases you will encrypt the above manifest and create two components. An initialization Vector (IV) and an encrypted message.
The final step is to create a URL as such:
let url = "https://easypay5.com/widgetlogger/?m=" + encrypted + "&i=" + IV + "&Eindex=300";
https://easypay5.com/widgetlogger/?Key=EP8698321|450D25CFBE1B4BEEADF1A4357920D692&inputs=MERCHID|1|REFID|A12345NO-99|FIRSTNAME|matt|LASTNAME|smith|ADDRESS1|23 elm st|ADDRESS2||CITY|Tulsa|STATE|OK|ZIP|92107|AMOUNT|10.000|WTYPE|MPC|REDIRECT|https://easypay7.com/PostingApp/
Here is the final URL:
https://easypay5.com/widgetlogger/?m=kndTrWFSNIPtBMEpL98l9dodyBD1v3JiT7D8IDoGVMRWsD8R3u6QKKBCaLaN+iCYnN5rGWh+tYN6ccWwZ3hDwwtLaHWoxD08eiw6C5RgG+UVyCMWlYv5fsJvr+yWTH2iY+8/xGE1bHbyBDPy/9k9K8UPMhiClE8CByCFcGwoV0xVaQM58r7YI3omAs7htB+qAnmyIyNepv395RqVprJa7p+k+NxV928RV0/7/T1pWwMKxdoEn9hVZnZOeBdYXcRYe/CRQSG1WLNmy98Xiq2zeA1n/sCQxxTg4y+50T3LvJKzJOnRXRQTQ4TshLsS2JY1&i=xVHwFeiBzv6d8Ib5EIcbQw==&Eindex=300
Notice at the end we have appended Eindex=300. This value tells us that you want to use a specific encryption Key (Our sandbox development key). Once you have finalized all your development, we will tell you which number to use for LIVE transactions.
When you use the Eindex=300, you are telling EasyPay that you have sent us an AES 256 encrypted message with a specific KEY. This key = A142278ED69B3FE6C5E8F63CB8205F519F3A82BEA9CB2719938DB88D5C35EC60.
Reference:
?Key=EP65913489|DA5AAC69CF294783BED9B1CD151781D1&inputs=MERCHID|1|REFID|A12345NO-99|FIRSTNAME|Matt|LASTNAME|Smith|ADDRESS1|23 Elm St|ADDRESS2|Apt 3|CITY|Tulsa|STATE|OK|ZIP|92107|AMOUNT|101.00|WTYPE|BL3PN|REDIRECT|https://easypay7.com/PostingApp/
- ACCOUNT CODE
- TOKEN
- INPUTS
- WTYPE