|
| 1 | +# Umbraco.Forms.Integrations.Commerce.emerchantpay |
| 2 | + |
| 3 | +This integration provides a custom workflow for handling online payments using a hosted payment page provided by emerchantpay. |
| 4 | + |
| 5 | +## Prerequisites |
| 6 | + |
| 7 | +Required minimum versions of Umbraco CMS: |
| 8 | +- CMS: 10.1.0 |
| 9 | +- Forms: 10.1.0 |
| 10 | + |
| 11 | +## How To Use |
| 12 | + |
| 13 | +### Authentication |
| 14 | + |
| 15 | +All requests to emerchantpay API are authenticated by providing the merchant's username and password. |
| 16 | + |
| 17 | +If the configuration is incomplete, the user will receive an error message. |
| 18 | + |
| 19 | +### Configuration |
| 20 | + |
| 21 | +The emerchantpay API endpoints accept and return XML data. When the form is submitted, two batches of payload data are exchanged: one for handling consumer information and the second one for creating the payment. |
| 22 | + |
| 23 | +A consumer has the following available properties that can be mapped against form fields: |
| 24 | +* Email |
| 25 | +* FirstName |
| 26 | +* LastName |
| 27 | +* Address1 |
| 28 | +* Address2 |
| 29 | +* ZipCode |
| 30 | +* City |
| 31 | +* State |
| 32 | +* Country |
| 33 | +* Phone |
| 34 | + |
| 35 | +The below configuration - consisting of authentication settings, merchant specific details and customizable payment fields - is required. Some configuration items |
| 36 | +are stored as an array of strings or a dictionary, and parsed using a specific service. |
| 37 | + |
| 38 | +``` |
| 39 | +{ |
| 40 | + "Umbraco": { |
| 41 | + "Forms": { |
| 42 | + "Integrations": { |
| 43 | + "Commerce": { |
| 44 | + "Emerchantpay": { |
| 45 | + "Settings": { |
| 46 | + "GatewayBaseUrl": "https://staging.gate.emerchantpay.net/", |
| 47 | + "WpfUrl": "https://staging.wpf.emerchantpay.net/wpf/", |
| 48 | + "Username": "[your_merchant_username]", |
| 49 | + "Password": "[your_merchant_password]", |
| 50 | + "UmbracoBaseUrl": "[your_website_url]", |
| 51 | + "Supplier": "Umbraco", |
| 52 | + "Usage": "Payment Gateway using Umbraco Forms", |
| 53 | + "Currencies": { |
| 54 | + "USD": "US Dollar", |
| 55 | + "EUR": "Euro", |
| 56 | + "GBP": "British Pound", |
| 57 | + "DKK": "Danish Krone" |
| 58 | + }, |
| 59 | + "TransactionTypes": [ "authorize", "sale" ], |
| 60 | + "MappingFields": [ "Email", "FirstName", "LastName" ] |
| 61 | + } |
| 62 | + } |
| 63 | + } |
| 64 | + } |
| 65 | + } |
| 66 | + } |
| 67 | +} |
| 68 | +``` |
| 69 | + |
| 70 | +### Working with the Umbraco Forms - emerchantpay integration |
| 71 | + |
| 72 | +To use it you will need to attach the _emerchantpay Gateway_ to a form and map the _Amount_, _Currency_, _Number of Items_, _Record Status_, _Record Payment Unique ID_ and _Consumer Details_ with matching form fields, then configure the event handlers |
| 73 | +for payment sucessfully processed, failed or cancelled. |
| 74 | + |
| 75 | +When a form is submitted on the website, the workflow will execute and based on it's settings, two data payloads will be sent to emerchantpay for creating or retrieving the details of a consumer, and for creating a payment. |
| 76 | +The response for the second request will provide the URL for the hosted payment page, and the user will the redirected there. |
| 77 | + |
| 78 | +On completing the payment the emerchantpay API will return the user to the page provided in matching event handler of the worklow. |
0 commit comments