Redsys

The payment extension for Redsys, a Spanish Payment Service Provider operating in Europe and Latin American, supports bulk card payment collection, as well as payments using Bizum.

Multi-merchantMulti-currency
Payment MethodOne-timeRecurringRefunds
Bizum
Card

Prerequisites

   The Redsys for FinDock package cannot be automatically updated with the normal release process. To receive updates, enhancements and fixes, you need to manually install the latest package version using the FinDock Installer.

Install the Redsys extension

Follow the standard procedure for installing payment processors to add the Redsys payment extension and activate payment methods.

Check and assign the required permissions. If you are using custom permission set groups, ensure the package-specific permission sets are assigned.

Configure Redsys extension

   If you are setting up a test environment, make sure you use Redsys test credentials.

The Redsys setup uses details from your Redsys account. Open up your Salesforce org in one browser tab, and in another, log into your Redsys administration portal.

To configure Redsys for FinDock:

  1. Launch the FinDock app and click the FinDock Setup tab.
  2. Go to Payment Processors & Methods.
  3. Under Installed Processors, click the Redsys processor entry.
  4. Click Add account.
  5. For the merchant account you want to integrate, add the following details:
    • Merchant Account Name: Enter a name for your Redsys target (merchant account).
    • Default Account: Enable on the account you want used when no account is specified in a payment intent call to the Payment API
    • Test Account: Enable if you are setting up a test environment. This toggle tells the FinDock which endpoint (test or production) to use at Redsys.
    • Notification URL: This value is automatically filled by FinDock and used for receiving messages from Redsys
    • Merchant Code: Enter your code from the Redsys administration portal.
    • Merchant Terminal: Enter your terminal ID from the Redsys administration portal.
    • Merchant Currency: Enter the same currency as in your Redsys administration portal. The value is based on ISO 4217.
    • Merchant Key: Enter the same key as in your Redsys administration portal.
    • Merchant Name: Enter the same name as in your Redsys administration portal.
    • Merchant Transaction Type: Enter the transaction type as set in your Redsys administration portal.(See input parameters.)
  6. Click Save.

Bulk payment collection

To collect payments using Redsys as a processor, you need to execute a bulk collection run. If you haven’t already, please take a moment to read about payment collections. Although executing a Redsys bulk collection run is similar, there are some significant differences.

To run a bulk collection for Redsys:

  1. Create a payment schedule and populate at least the following fields:
    • Status = Scheduled
    • Source = name of the source activated in your org, e.g. PaymentHub or PaymentHub-for-NPSP
    • Payment Processor = PaymentHub-Redsys
    • Payment Method = CreditCard
    • Target = this field is inactive for Redsys
    • Collection date = A value is required. However, installments are collected immediately after executing the Payment Schedule, therefore any date can be added.
    • Run date = Today
    • Selection Date = Any date. All installments (with same source, processor and method) with a due date on or before the selection date are included in the run.
  2. Execute the payment schedule by changing the status to Generate or clicking the Start Generation button.
    • As with a regular payment schedule, in this step all eligible installments for this collection run are added to the payment schedule. This step is finished when the status of the payment schedule changes to Generated. At least the following needs to be true for installments to be added to the payment schedule:
      • The status of the installment should be New.
      • Source, payment method, payment processor values have to match the payment schedule being executed.
      • The due date has to be on or before the selection date on the payment schedule.
  3. After you’ve verified all installments eligible for this run are added to the payment schedule, click Process or change the status of the schedule to Process.

The last step is different compared to a regular payment schedule because all installments are sent to Redsys for processing.

  • If installments are processed successfully, they are closed as Collected and payments are created.
  • If for some reason Redsys wasn’t able to process installments, the status of these installments is set to Failed. The failure reason is recorded in the Last Status Reason field.
  • When all installments are processed, the payment schedule is set to Done.

FinDock saves the request sent to Redsys and the response received from Redsys on the individual installment records. These raw messages can be found in the fields:

  • Last Raw Request
  • Last Raw Response

Payment API

To test your configuration, you can use the following API messages.

Single credit card payment

{
    "SuccessURL":"http://www.success.nl",
    "FailureURL":"http://www.fail.nl",
    "Payer":{
        "Contact":{
            "SalesforceFields":{
              "FirstName":"Test",
              "LastName":"Payment",
              "Email":"testpayment@findock.com"
            }
        },
    },
    "OneTime":{
        "Amount":15
    },
    "PaymentMethod":{
      "Name":"CreditCard",
			"Processor" :"PaymentHub-Redsys",
            "Parameters": {
            }
    },
    "Settings":{
          "ProcessingType":"Default",
          "SourceConnector":"PaymentHub"
      }
}

Recurring credit card payment

{
    "SuccessURL":"http://www.success.nl",
    "FailureURL":"http://www.fail.nl",
    "Payer":{
        "Contact":{
            "SalesforceFields":{
              "FirstName":"Test",
              "LastName":"Payment",
              "Email":"testpayment@findock.com"
            }
        },
    },
   "Recurring": {
      "Amount": 1.23,
      "Frequency": "Monthly",
      "StartDate": "2020-06-30",
      "SalesforceFields": {
      }
   },
    "PaymentMethod":{
        "Name":"CreditCard",
			"Processor" :"PaymentHub-Redsys",
      "Parameters": {
      }
    },
    "Settings":{
          "ProcessingType":"Default",
          "SourceConnector":"PaymentHub"
    }
}

Was this page helpful?