|
| 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: 8.5.4 |
| 9 | +- Forms: 8.13.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 | +<appSettings> |
| 40 | +... |
| 41 | +<add key="Umbraco.Forms.Integrations.Commerce.eMerchantPay.GatewayBaseurl" value="https://staging.gate.emerchantpay.net/"/> |
| 42 | +<add key="Umbraco.Forms.Integrations.Commerce.eMerchantPay.WpfUrl" value="https://staging.wpf.emerchantpay.net/wpf"/> |
| 43 | +<add key="Umbraco.Forms.Integrations.Commerce.eMerchantPay.Username" value="[your_merchant_username]"/> |
| 44 | +<add key="Umbraco.Forms.Integrations.Commerce.eMerchantPay.Password" value="[your_merchant_password]"/> |
| 45 | +<add key="Umbraco.Forms.Integrations.Commerce.eMerchantPay.UmbracoBaseUrl" value="[your_website_url]"/> |
| 46 | +<add key="Umbraco.Forms.Integrations.Commerce.eMerchantPay.Supplier" value="Umbraco"/> |
| 47 | +<add key="Umbraco.Forms.Integrations.Commerce.eMerchantPay.Usage" value="Payment Gateway using Umbraco Forms"/> |
| 48 | +<add key="Umbraco.Forms.Integrations.Commerce.eMerchantPay.Currencies" value="USD,US Dollar;EUR,Euro;GBP,British Pound;DKK,Danish Krone"/> |
| 49 | +<add key="Umbraco.Forms.Integrations.Commerce.eMerchantPay.TransactionTypes" value="authorize;sale"/> |
| 50 | +<add key="Umbraco.Forms.Integrations.Commerce.eMerchantPay.MappingFields" value="Email;FirstName;LastName"/> |
| 51 | +... |
| 52 | +</appSettings> |
| 53 | +``` |
| 54 | + |
| 55 | +### Working with the Umbraco Forms - emerchantpay integration |
| 56 | + |
| 57 | +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 |
| 58 | +for payment sucessfully processed, failed or cancelled. |
| 59 | + |
| 60 | +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. |
| 61 | +The response for the second request will provide the URL for the hosted payment page, and the user will the redirected there. |
| 62 | + |
| 63 | +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