Klevr Product Documentation logo

Payfurl Configuration

This article describes how to configure Payfurl for use as a payment provider.

Feature Overview

This article describes how to configure Payfurl for use as a payment provider.

Assumptions

You already have a payfurl subscription and are familiar with the payfurl dashboard and usage.

Setup

1
Create a Payment Processor record

To start using payfurl, create a new Payment Processor in Dynamics:

  • Name: Payfurl
  • Payment Processor: Payfurl
  • Code: This needs to be the Public key, found in the payfurl dashboard under account.
  • External Reference: This needs to be either sandbox or production, depending on your payfurl environment type
  • Configuration: This is used to get to the secret key. Preferably this should be located in a keyvault. See the tooltip on the field for more info.
2
Create a Payment Processor Method for each provider

Next, you would need to create Payment Processor Methods for any providers loaded within Payfurl. In your payfurl dashboard, navigate to providers, and note the list. Each provider has a unique id in the form of a guid.

For each provider, create a payment processor method:

  • External Reference: The guid from the provider list on the payfurl dashboard
  • Payment Processor: Payfurl
  • Payment Method Type: Credit Card
  • Name: Someting to easily identify it, e.g. Payfurl - <Provider>
3
Enable webhooks

You also need to enable webhooks. This requires the latest portal version 2.22.1 and above. In your payfurl dashboard, find the webhook section, and add a webhook for all of the events. Point the url to https://yourPortalUrlGoesHere/_hooks/payfurlwebhook

4
Configure the webhook authorisation key

For the authorisation, generate a long strong password and save it in there. This password also needs to be added to your portal library variables, in a variable called Klevr.PayfurlAuthKey and then the portal needs to be deployed, or you need to add it manually to the appsettings.json file in the app service editor for your portal.

Web hooks will not work with a blank password, so don't even try it.

Priority:

Both Payment Processor and Payment Processor method has a priority. Lower numbers indicate higher priority (i.e. 1 is ranked higher than 5). In some cases where you do not explicitly specify a processor or method, the system will take the one with the highest priority (for instance using the payment generator in the portal). You can override it by specifying the details on the payment record.

General Usage:

You can now create a payment method associated to a contact. Select payfurl and the payfurl provider as the payment processor and payment processor method. Save the record, then click on the "Add Payment Details" button on the ribbon. This will open up a screen that will allow you to manually add credit card details.

Once this is saved successfully, the payment method will be updated with the card details, and the contact will be created as a customer in payfurl, and a contact payment processor record will be created against the contact to store the Payfurl customer id for this contact. This payment method can now be used to take payments.

Security Considerations

If you are going to "wrap" Stripe up with payfurl, then please note that Payfurl deals with cards directly, whereas Stripe likes to deal with cusotmers with attached cards. In order to successfully use Stripe as a provider within Payfurl, you have to follow a process to allow Stripe to deal with cards without customers. Please see https://support.stripe.com/questions/enabling-access-to-raw-card-data-apis for more details.

Testing and Test Cards

Each provider has their own way of testing, and since payfurl is just an aggregator and proxy for the underlying providers, you need to understand how the provider itself works and responds to test inputs. We cannot document every provider here, nor can we keep that information up to date, so please google the provider(s) documentation for clarification on how to test scenario's.

Stripe has a number of test cards, and their cards have got card tokens, but the tokens don't work through payfurl.

Some bank providers use the decimal value in the specified amount to return errors, e.g. buying a product for $20.01 will return error 01, and for successful payments you have to use round numbers like $20.

Updating Card Expiry Dates

Payfurl provides an API for updating a card expiry date. Note that this is not supported by all providers and only works in specific circumstances. Payfurl recommmends re-tokenising the card when a new card is issued after expiry. However we have implemented this API call upon a request form a customer. This is triggered via plugin on update of the expiry date on the payment method record. By default the expiry date fields are locked on the form, since this only works in specific cases.

If you wish to use it, you will need to either unblock the fields, or update the fields thorugh an import, flow or other similar process. You have to set all three fields: the expiry month, expiry year and expiry date, and they have to match. The plugin validates the following: If the payment method had an existing expiry date, and the date is changed, and the processor is payfurl and there is an external token, then the plugin will trigger the Payfurl API. If Payfurl returns an error, a plugin exception will be thrown, and the changes to the CE record will be rolled back. In this case you should consider retokenising the card in a new payment method and disabling the old payment method.

Last updated on