Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

General Information

The PAYONE Payment-Extension for Magento 2.0 enables the connection of Magento version 2.0.0 and higher to the PAYONE platform for secure and automated handling of all payment processes.
The extension fits seamlessly into the existing checkout process of the Magento shop.
In the Magento administration area, extensive configuration and administration options are available. All functions of the extension can be configured individually and according to requirements.
The PAYONE Payment-Extension is developed in close cooperation with the agency FATCHIP GmbH and can be downloaded free of charge by interested merchants.
The extension is constantly being further developed.
Further information can be found at https://www.payone.com/magento and http://www.payone.com .

Functional Description

Supported Payment Methods

The extension supports the processing of the following payment methods via the PAYONE platform.

UI Tabs UI Tab
titlecredit and debit cards
VisaMastercardMaestroAmerican ExpressJCBDiners ClubDiscover

Image Removed

Image Removed

Image Removed

Image Removed

Image Removed

Image Removed

Image Removed

UI Text Box
typeinfo
Information: Depending on the respective acceptance contract, other payment methods such as Visa Electron, Visa Debit and other cards can also be processed via the aforementioned payment methods. Please contact us if you need further information.
UI Tab
titleSecurity Procedure
Verified by VisaMasterCard SecureCodeAmerican Express SafeKey

Image Removed

Image Removed

Image Removed

UI Tab
titleOnline Bank Transfer
GiropaySofortEPSiDEALPostFinance

Image Removed

Image Removed

Image Removed

Image Removed

Image Removed

UI Tab
titleWire Transfer
SEPAPrepaymentInvoiceCash on Delivery

Image Removed

Image Removed

Image Removed

Image Removed

UI Tab
titleWallets
PayPalPaydirektAmazon PayAlipay

Image Removed

Image Removed

Image Removed

Image Removed

UI Tab
titleSecured Payment Methods (factoring)
PAYONE Secure InvoiceKlarnaPaysafe Pay Later

Image Removed

Image Removed

Image Removed

UI Tab
titleCash
Barzahlen

Image Removed

Installation with Composer

Go to the root directory of your Magento 2 installation and execute the following commands.

Code Block
languagebash
titleConsole
linenumberstrue
composer require payone-gmbh/magento-2 
php bin/magento setup:upgrade 
php bin/magento setup:di:compile 
php bin/magento cache:clean

Code on Github 
Awesome Icon
size40px
iconfa-github

You are invited to download or contribute to our plugin on github!

Githubdownload
Repohttps://github.com/PAYONE-GmbH/magento-2/releases
Orientationcenter

Configuration in the PAYONE Merchant Interface

Transactionstatus URL

To send the transaction status to the correct address, the following must be entered in the PAYONE Merchant Interface (PMI).
Configuration > Payment Portals > YOUR_PORTAL > Advanced > TransactionStatus URL

UI Text Box
typeinfo
https://www.example.com/payone/transactionstatus

Image Removed

UI Text Box
typetip

please leave the hash calculation method on md5 to ensure correct communication between the PAYONE platform and magento

Configuration

UI Text Box
typewarning

due to limitations introduced in Magento 2.3.1, all payment methods are active by default after the initial installation. Please make sure that you deactivate all payment methods you don't need before launch!

General Information

Image Removed

Global

Image Removed

Field

Description

Merchant ID

The customer number assigned by PAYONE.

portal ID

The ID of the payment portal via which the shop sends its requests to the PAYONE platform.

sub account ID

The ID of the sub-account you created in the PMI through which the transactions are processed.

security key

The key you assign in the PMI to encrypt requests to the PAYONE platform.

Reference number prefix

Prefix for the reference parameter transmitted to PAYONE. This serves to avoid overlapping of different systems / installations.
In the parameter reference the Magento order number including this value is transmitted to PAYONE. If this value is not set, only the Magento order number will be transmitted.

Payment from Applicable Countries

Selection option for the shop in which countries payment via PAYONE is to be made possible.

authorize method

Indicates whether the payment type is addressed by "authorization" or "preauthorization".

  • Authorization - Here the payment method is debited directly when ordering (where possible) and a claim is written on the BS PAYONE platform.
  • Preauthorization - As far as possible, payment will be reserved at the time of order. The payment has to be collected later in the order.

UI Text Box
typeinfo

Please note
Which authorization method is used for which payment method can have an effect on the cash flow. Which method you should use depends strongly on the business model and the payment type.

In the case of online transfers (immediate transfer, giropay, etc.), the cash flow takes place directly, irrespective of the time of booking the receivable.

Transmit IP address

Select whether the IP address of the end customer should be transmitted to the PAYONE platform.

Data for Global Configuration

Image Removed

The parameters Merchant ID, Portal ID, Key and Subaccount ID are mandatory to operate the plugin.

UI Text Box
typetip

Do you not have access to the PMI yet? Request your test account here: https://www.bspayone.com/DE/de/channel/online

Send invoice information

Image Removed

Field

Description

Transmit invoice information

Select Yes / No. This option activates the transmission of article data in order to create an invoice on the PAYONE platform.

Dynamic invoice message

Free text entry for a dynamic text on the invoice. The maximum length is 255 characters and various Magento variables can be used as placeholders.

Dynamic refund message

Free text entry for a dynamic text on the credit memo. The maximum length is 255 characters and various Magento variables can be used as placeholders.

Status Mapping

Image Removed
In this mask the different transaction statuses of the PAYONE platform can be mapped to Magento order status. If a new transaction status is received, the corresponding "Magento status" is set in the order overview in the Magento backend.

Credit Card Payment

User-defined display for the hosted iframe

Image Removed

Field

Description

type

Selection of:

  • Numeric- Only numbers are allowed and for mobile devices the numeric keyboard is used input type="tel".
  • Password - input type="password"
  • Text - input type="text"

digit count

Length of the field in characters ( HTML attribute size )

max digits

Maximum length of input ( HTML attribute maxlength )

iFrame

Selection of:

  • Standard - Uses width and height from standard style
  • Custom - Uses width and height from the following fields

width

CSS - Specify width

Height

CSS - Indication of height

style

  • Standard - Uses CSS specification from Standard
  • Custom- Uses CSS specification from the following field

CSS

Specification of CSS properties for field
Deactivated with previous selection of Standard

Standard styles

  • Input - CSS specification for all input fields (HTML input)
  • Selection - CSS specification for all selection fields (HTML select )

iFrame

  • Width - CSS specification
  • Height - CSS specification

error output

 

active

checkbox

language

Select the language in which the error message should be returned.

Preview

At this point you can see how the appearance looks like according to the previous setting of the payment method credit card in the checkout.
Image Removed

Payment Methods

Image Removed

Edit Payment Method

Image Removed

Field

Description

Enabled

Select Yes / No if the payment method is activated.

title

Free text entry for the name of the payment method as it is displayed to the customer in the checkout.

New Order Status

Status the Magento order will have after use of this payment method.

instructions

Free text input for the display of additional information on the payment type in the checkout.

Minimum Order Total

The minimum value of goods from which the payment type is displayed to the customer in the checkout.

Maximum Order Total

The maximum value of goods up to which the payment method is displayed to the customer in the checkout. Please note that here, in contrast to the configuration of the credit check, the Magento internal value "BaseGrandTotal" (i.e. the completely invoiced amount including VAT and shipping costs) is used as a basis.

Sort Order

Enter an integer that determines where in the checkout the payment method is offered to the customer.

fashion

Choice between Test / Live. This determines whether the PAYONE platform is addressed in Test or Live mode.

Use Global Settings

Select Yes / No. If No is selected, all parameters from the global settings can be configured individually for this payment method.

Payment Type-Specific Settings

The following describes the configuration options that are specific to a payment type. Only those fields are explained that differ from the above configuration or are new.

Credit Card

Image Removed

Field

Description

type of credit card

Multiple selection. Which credit card brands should be offered in the frontend?

Check Card Validation Code

Determines whether the credit card verification number is queried. This is only possible if the acquirer allows it.

UI Text Box
typeinfo

From a purely technical point of view, querying the CVC is optional. However, most end customers are used to the query.

SEPA Basic Direct Debit Scheme

Image Removed

Field

Description

Message to display for blocked bank accounts

This message is displayed in the checkout if the bank details check returns a negative result.

List of supported SEPA countries

Multiple selection of the countries from which the payment type debit memo is supported. The PAYONE platform currently only supports direct debits for German bank accounts.

Mandates enabled

Select Yes / No. Should the SEPA mandate manager be used? A check of the bank details is obligatory. A check against the POS lock list is not possible.

Mandates download enabled

Select Yes / No. If Yes is selected, a link is offered after the order has been placed, via which the end customer can download the SEPA Mandate as a PDF file.

PayPal

Image Removed

Field

Description

PayPal Express enabled

Activation of the PayPal Express button in the shopping cart display

Amazon Pay

UI Steps
UI Step

Integration Settings in Seller Central
Please enter the following URL under Integrator-URL in the item "Integration settings" in Seller Central: https://gpc-sys.pay1.de/gpc/amazon/1.0/notify - the "Seller URL" may remain empty. This URL ensures that the shop receives all notifications from Amazon.

Image Removed

Also please make sure to store all your shop URLs as allowed Javascript Origin in Seller Central

Image Removed

UI Step

Retrieve Configuration in Magento Backend

To activate the payment method, please use the "get configuration" button. This retrieves your client ID and Seller ID from our Platform. You should then see the values in the corresponding fields.

UI Step

Activate the Payment Method

Please note that you can only make live payments after the payment method is allowed for live payments in Seller Central

Image Removed

FieldDescriptionExampleAmazon Client IDDisplays the current Client IDAmazon Seller IDDisplays the current Seller IDGet configuration

click this button to retrieve the current configuration from PAYONE.

UI Text Box
typewarning

This payment method won't work before the configuration has been saved!

Amazon Button Type

Selection of

  • Amazon Pay (normal) 
  • Pay (smaller)
  • Amazon Pay (smallest)

Image Removed

Image Removed

Image Removed

Amazon Button Color

Selection of

  • Gold
  • Light grey
  • Dark grey

Image Removed

Image Removed Image Removed Image Removed

Image Removed Image Removed Image Removed

Amazon Mode

Selection of

  • Automatic (uses the client's default language)
  • English
  • German
  • French
  • Italian
  • Spanish
Amazon Mode

Selection of

  • Always Synchronous
  • Asynchronous on failure
async on failure can have better conversion rate, but can complicate your workflow.

Protect

Simple Protect

Introduction

Simple Protect is the easy and flexible way of using all the data you have, right in the moment when your shop is proccessing the checkout. You can i.e. gain information from:

  • your magento 2 shop database
  • the current checkout session
  • external sources that can be reached and accessed from the shop server
    • datawarehouse
    • csv / xml / txt - files that can be accessed with PHP
    • APIs or extensions like the PAYONE Protect Functions
  • and many more.

Here is an example of some complex decisions that can be performed using our simple protect framework:

draw.io DiagrambordertrueviewerToolbartruefitWindowfalsediagramDisplayNamelboxtruerevision2diagramNamemagento-2-simple-protect-examplesimpleViewerfalsewidthlinksautotbstylehiddendiagramWidth1107
UI Text Box

Simple Protect is currently under beta stage. If you want to use this functionality you have to download the PAYONE Integration from the Simple Protect branch:

Githubdownload
Repohttps://github.com/PAYONE-GmbH/magento-2/tree/simple-protect
TooltipSimple Protect Framework

After that, please follow the intructions for installing the Simple Protect Template here:

Githubdownload
Repohttps://github.com/PAYONE-GmbH/magento-2-simple-protect
TooltipSimple Protect Template

UI Text Box
typewarning

Please be aware that all functions described in the legacy part of this documentation won't be available anymore when using simple protect. For the time being, we also don't offer a migration mechanism.

Configuration

There is only one configuration option present in the backend from magento 2. The Protect-Mode. This can be found at:

UI Text Box
sizemedium
typetip

Stores > PAYONE > General > Protect - Mode

Image Removed

Field

Description

Protect-Mode

There are to options available:

  • Test (default)
  • Live
UI Text Box
typewarning

This option only affects requests regarding the PAYONE - API like adresscheck or consumerscore. Any other code will be executed as developed.

Entry points / Points of action

The class app/code/Payone/SimpleProtect/Model/SimpleProtect/SimpleProtect.php is the central point to implement the decisions. The following methods reperesent the points where the actions are taking place.

Code Block
languagephp
titleExample of full implementation
linenumberstrue
collapsetrue
<?php

/**
 * PAYONE Magento 2 Connector is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * PAYONE Magento 2 Connector is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with PAYONE Magento 2 Connector. If not, see <http://www.gnu.org/licenses/>.
 *
 * PHP version 5
 *
 * @category  Payone
 * @package   Payone_Magento2_SimpleProtect
 * @author    FATCHIP GmbH <support@fatchip.de>
 * @copyright 2003 - 2019 Payone GmbH
 * @license   <http://www.gnu.org/licenses/> GNU Lesser General Public License
 * @link      http://www.payone.de
 */

namespace Payone\SimpleProtect\Model\SimpleProtect;

use Magento\Payment\Model\MethodInterface;
use Magento\Quote\Model\Quote;
use Payone\Core\Model\SimpleProtect\SimpleProtect as OrigSimpleProtect;
use Payone\Core\Model\PayoneConfig;
use Magento\Customer\Api\Data\CustomerInterface;
use Magento\Quote\Model\Quote\Address;
use Payone\Core\Model\Source\AddressCheckType;
use Payone\Core\Model\Source\CreditratingCheckType;
use Magento\Framework\Exception\LocalizedException;
use Payone\Core\Model\Exception\FilterMethodListException;
use Payone\Core\Model\Api\Response\AddresscheckResponse;
use Payone\Core\Model\Api\Response\ConsumerscoreResponse;
use Magento\Quote\Api\Data\AddressInterface;
use Magento\Store\Model\ScopeInterface;

class SimpleProtect extends OrigSimpleProtect
{
    const MODULE_VERSION = '1.0.0';

    /**
     * Whitelist of safe payment methods
     *
     * @var array
     */
    protected $safePaymentMethods = [
        PayoneConfig::METHOD_ADVANCE_PAYMENT,
        PayoneConfig::METHOD_CREDITCARD,
        PayoneConfig::METHOD_PAYPAL
    ];

    /**
     * PAYONE Protect model providing access to consumerscore and addresscheck requests
     *
     * @var \Payone\Core\Model\SimpleProtect\ProtectFunnel
     */
    protected $protectFunnel;

    /**
     * Database connection resource
     *
     * @var \Magento\Framework\App\ResourceConnection
     */
    protected $databaseResource;

    /**
     * Checkout session object
     *
     * @var \Magento\Checkout\Model\Session\Proxy
     */
    protected $checkoutSession;

    /**
     * Scope config object
     *
     * @var \Magento\Framework\App\Config\ScopeConfigInterface
     */
    protected $scopeConfig;

    /**
     * Constructor
     *
     * @param \Payone\Core\Model\SimpleProtect\ProtectFunnel     $protectFunnel
     * @param \Magento\Framework\App\ResourceConnection          $resource
     * @param \Magento\Checkout\Model\Session\Proxy              $checkoutSession
     * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
     */
    public function __construct(
        \Payone\Core\Model\SimpleProtect\ProtectFunnel $protectFunnel,
        \Magento\Framework\App\ResourceConnection $resource,
        \Magento\Checkout\Model\Session\Proxy $checkoutSession,
        \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
    ) {
        parent::__construct($protectFunnel);
        $this->databaseResource = $resource;
        $this->checkoutSession = $checkoutSession;
        $this->scopeConfig = $scopeConfig;
    }

    /**
     * Returns configured operation mode used for the addresscheck and consumerscore
     *
     * @return string
     */
    public function getOperationMode()
    {
        return $this->scopeConfig->getValue('payone_general/global/protect_mode', ScopeInterface::SCOPE_STORES);
    }

    /**
     * Get count of customers orders
     *
     * @param CustomerInterface $oCustomer
     * @return int
     */
    protected function getCustomersOrderCount(CustomerInterface $oCustomer)
    {
        $db = $this->databaseResource->getConnection();
        $oSelect = $db->select()
            ->from($this->databaseResource->getTableName('sales_order'), ['COUNT(entity_id)'])
            ->where("customer_id = :customerId");
        $iCount = $db->fetchOne($oSelect, ['customerId' => $oCustomer->getId()]);
        if ($iCount === null) {
            return 0;
        }
        return $iCount;
    }

    /**
     * Check if the customer has ordered before
     *
     * @param CustomerInterface $oCustomer
     * @return bool
     */
    protected function isRecurringCustomer(CustomerInterface $oCustomer)
    {
        if ($this->getCustomersOrderCount($oCustomer) == 0) {
            return false;
        }
        return true;
    }

    /**
     * Possibility to whiteliste customers with custom functionality
     *
     * @param  CustomerInterface $oCustomer
     * @return bool
     */
    protected function isCustomerWhitelisted(CustomerInterface $oCustomer)
    {
        return true; // implement this for yourself or remove completely
    }

    /**
     * Generate hash of given address for comparison
     *
     * @param  Address $oAddress
     * @return string
     */
    protected function getAddressHash(Address $oAddress) {
        $sAddress  = $oAddress->getFirstname();
        $sAddress .= $oAddress->getLastname();
        $sAddress .= $oAddress->getCity();
        $sAddress .= $oAddress->getPostcode();
        $sAddress .= $oAddress->getCountry();
        $sAddress .= $oAddress->getStreetFull();

        return md5($sAddress);
    }

    /**
     * Compare given addresses, return true if they are the same
     *
     * @param  Address $oBilling
     * @param  Address $oShipping
     * @return bool
     */
    protected function isBillingAndShippingAddressTheSame(Address $oBilling, Address $oShipping)
    {
        if ($this->getAddressHash($oBilling) != $this->getAddressHash($oShipping)) {
            return false;
        }
        return true;
    }

    /**
     * Filter out all payment methods except for the safe payment methods
     *
     * @param  MethodInterface[] $aPaymentMethods
     * @return MethodInterface[]
     */
    protected function getSafePaymentMethods($aPaymentMethods)
    {
        $aReturn = [];
        foreach ($aPaymentMethods as $oPaymentMethod) {
            if (in_array($oPaymentMethod->getCode(), $this->safePaymentMethods) === true) {
                $aReturn[] = $oPaymentMethod;
            }
        }
        return $aReturn;
    }

    /**
     * Examples of all the options for addresscheck usage
     *
     * @param  Quote $oQuote
     * @return AddresscheckResponse|bool
     */
    protected function executeAddresscheck(Quote $oQuote)
    {
        $oAddress = $oQuote->getBillingAddress();
        #$oAddress = $oQuote->getShippingAddress();

        #$sAddresscheckType = AddressCheckType::NONE;
        $sAddresscheckType = AddressCheckType::BASIC;
        #$sAddresscheckType = AddressCheckType::PERSON;
        #$sAddresscheckType = AddressCheckType::BONIVERSUM_BASIC;
        #$sAddresscheckType = AddressCheckType::BONIVERSUM_PERSON;

        return $this->protectFunnel->executeAddresscheck($oAddress, $this->getOperationMode(), $sAddresscheckType, $this->getModuleVersion());
    }

    /**
     * Examples of all the options for consumerscore usage
     *
     * @param  Quote $oQuote
     * @return ConsumerscoreResponse|bool
     */
    protected function executeConsumerscore(Quote $oQuote)
    {
        $oAddress = $oQuote->getBillingAddress();
        #$oAddress = $oQuote->getShippingAddress();

        #$sConsumerscoreType = CreditratingCheckType::INFOSCORE_HARD;
        $sConsumerscoreType = CreditratingCheckType::INFOSCORE_ALL;
        #$sConsumerscoreType = CreditratingCheckType::INFOSCORE_ALL_BONI;
        #$sConsumerscoreType = CreditratingCheckType::BONIVERSUM_VERITA;

        $sAddresscheckType = AddressCheckType::NONE;
        #$sAddresscheckType = AddressCheckType::BASIC;
        #$sAddresscheckType = AddressCheckType::PERSON;
        #$sAddresscheckType = AddressCheckType::BONIVERSUM_BASIC;
        #$sAddresscheckType = AddressCheckType::BONIVERSUM_PERSON;

        return $this->protectFunnel->executeConsumerscore($oAddress, $this->getOperationMode(), $sConsumerscoreType, $sAddresscheckType, $this->getModuleVersion());
    }

    /**
     * Check rules for recurring registered customers
     *
     * @param  Quote $oQuote
     * @return bool
     */
    protected function isOnlySafePaymentApplicableForRecurringCustomer(Quote $oQuote)
    {
        if ($oQuote->getBaseGrandTotal() > 400 || $this->isCustomerWhitelisted($oQuote->getCustomer()) === false) {
            return true;
        }
        return false;
    }

    /**
     * Check rules for first time registered customer
     *
     * @param  Quote $oQuote
     * @param  bool  $blIsPrePaymentSelection
     * @return bool
     */
    protected function isOnlySafePaymentApplicableForInitialOrder(Quote $oQuote, $blIsPrePaymentSelection)
    {
        if ($blIsPrePaymentSelection === false && $this->isBillingAndShippingAddressTheSame($oQuote->getBillingAddress(), $oQuote->getShippingAddress()) === false) {
            return true;
        }

        if ($oQuote->getBaseGrandTotal() > 120) {
            return true;
        }

        if ($blIsPrePaymentSelection === false && !in_array($oQuote->getPayment()->getMethodInstance()->getCode(), $this->safePaymentMethods)) {
            $oResponse = $this->executeConsumerscore($oQuote);
            if ($oResponse instanceof ConsumerscoreResponse && ($oResponse->getStatus() != 'VALID' || $oResponse->getScore() != 'G')) {
                return true;
            }
        }
        return false;
    }

    /**
     * Check if only safe payment methods are applicable
     *
     * @param  Quote $oQuote
     * @param  bool  $blIsPrePaymentSelection
     * @return bool
     */
    protected function isOnlySafePaymentApplicable(Quote $oQuote, $blIsPrePaymentSelection)
    {
        if ($this->checkoutSession->getPayoneSimpleProtectOnlySafePaymentsAllowed() === true) {
            return true;
        }

        if ($oQuote->getCustomerId() === null) { // if guest checkout
            return true;
        }

        if ($this->isRecurringCustomer($oQuote->getCustomer()) === true) {
            return $this->isOnlySafePaymentApplicableForRecurringCustomer($oQuote);
        }
        return $this->isOnlySafePaymentApplicableForInitialOrder($oQuote, $blIsPrePaymentSelection);
    }

    /************************* MAIN SIMPLEPROTECT HOOKS *************************/

    /**
     * This method can be extended for individual custom behaviour
     *
     * Extending this method gives the following possibilities:
     * 1. Filtering out payment methods based on your own rule set
     * 2. Throwing a LocalizedException to send the user back to shipping method selection
     *
     * @param  Quote             $oQuote
     * @param  MethodInterface[] $aPaymentMethods
     * @return MethodInterface[]
     */
    public function handlePrePaymentSelection(Quote $oQuote, $aPaymentMethods)
    {
        if ($this->isOnlySafePaymentApplicable($oQuote, true) === true) {
            return $this->getSafePaymentMethods($aPaymentMethods);
        }
        return $aPaymentMethods;
    }

    /**
     * This method can be extended for individual custom behaviour
     *
     * Extending this method gives the following possibilities:
     * 1. Throwing a LocalizedException will stop the order creation and throw the user back to payment selection with the given thrown message
     * 2. Throwing a FilterMethodListException with an array of safe payment methods will stop the order creation and
     *    throw the user back to payment selection with the given thrown message and remove all other payment methods except for the given ones
     * 3. Finishing the method - so throwing no Exception will finish the order creation
     *
     * @param  Quote $oQuote
     * @return void
     * @throws LocalizedException
     * @throws FilterMethodListException
     */
    public function handlePostPaymentSelection(Quote $oQuote)
    {
        if ($this->isOnlySafePaymentApplicable($oQuote, false) === true) {
            $sMethodCode = $oQuote->getPayment()->getMethodInstance()->getCode();
            if (!in_array($sMethodCode, $this->safePaymentMethods)) {
                $this->checkoutSession->setPayoneSimpleProtectOnlySafePaymentsAllowed(true);
                throw new FilterMethodListException(__('Please select another payment method.'), $this->safePaymentMethods);
            }
        }
    }

    /**
     * This method can be extended to transfer the version of your Simple-Protect implementation to Payone
     * It is recommended to transfer the name of your module and the version, otherwise Payone doesn't know that it is a Simple-Protect call
     *
     * @return string|null
     */
    public function getModuleVersion()
    {
        return 'Payone_SimpleProtect-'.self::MODULE_VERSION;
    }
}


UI Text Box
typetip

We're curating more samples at Magento 2 - Simple Protect. Here you will find more information on how to gain data for your decisions. You're also invited to add more examples as issues on github or vial email at docs@payone.com

handlePrePaymentSelection

Implementing this method gives you the following possibilities:

  1. Throwing a LocalizedException will stop the order creation and throw the user back to payment selection with the given thrown message
  2. Throwing a FilterMethodListException with an array of safe payment methods will stop the order creation and throw the user back to payment selection with the given thrown message and remove all other payment methods except for the given ones
  3. Finishing the method - so throwing no Exception will finish the order creation
Code Block
languagephp
linenumberstrue
@param  Quote $oQuote
@param  MethodInterface[] $aPaymentMethods
@return MethodInterface[]

public function handlePrePaymentSelection(Quote $oQuote, $aPaymentMethods)
{
    if ($this->isOnlySafePaymentApplicable($oQuote, true) === true) {
        return $this->getSafePaymentMethods($aPaymentMethods);
    }
    return $aPaymentMethods;
}
handlePostPaymentSelection

Implementing this method gives you the following possibilities:

  1. Throwing a LocalizedException will stop the order creation and throw the user back to payment selection with the given thrown message
  2. Throwing a FilterMethodListException with an array of safe payment methods will stop the order creation and throw the user back to payment selection with the given thrown message and remove all other payment methods except for the given ones
  3. Finishing the method - so throwing no Exception will finish the order creation
Code Block
languagephp
linenumberstrue
@param  Quote $oQuote
@return void
@throws LocalizedException
@throws FilterMethodListException

public function handlePostPaymentSelection(Quote $oQuote)
{
    if ($this->isOnlySafePaymentApplicable($oQuote, false) === true) {
        $sMethodCode = $oQuote->getPayment()->getMethodInstance()->getCode();
        if (!in_array($sMethodCode, $this->safePaymentMethods)) {
            $this->checkoutSession->setPayoneSimpleProtectOnlySafePaymentsAllowed(true);
            throw new FilterMethodListException(__('Please select another payment method.'), $this->safePaymentMethods);
        }
    }
}
handleEnterOrChangeBillingAddress

Implementing this method gives you the following possibilities:

  1. Returning true will just continue the process without changing anything
  2. Returning a (changed) address object instance of AddressInterface will show an address correction prompt to the customer
  3. Throwing a LocalizedException will show the given exception message to the customer
Code Block
languagephp
linenumberstrue
@param AddressInterface $oAddressData
@param bool $blIsVirtual
@param double $dTotal
@return AddressInterface|bool
@throws LocalizedException

public function handleEnterOrChangeBillingAddress(AddressInterface $oAddressData, $blIsVirtual, $dTotal)
    {
        $response = $this->protectFunnel->executeAddresscheck($oAddressData, $this->getOperationMode(), AddressCheckType::BASIC);
        if ($oAddressData->getCity() == "FalscheStadt") {
            $oAddressData->setCity($response->getCity());
            return $oAddressData;
        }
        return true;
    }
handleEnterOrChangeShippingAddress

Implementing this method gives you the following possibilities:

  1. Returning true will just continue the process without changing anything
  2. Returning a (changed) address object instance of AddressInterface will show an address correction prompt to the customer
  3. Throwing a LocalizedException will show the given exception message to the customer
Code Block
languagephp
linenumberstrue
@param AddressInterface $oAddressData
@param bool $blIsVirtual
@param double $dTotal
@return AddressInterface|bool
@throws LocalizedException

public function handleEnterOrChangeShippingAddress(AddressInterface $oAddressData, $blIsVirtual, $dTotal)
    {
        $response = $this->protectFunnel->executeAddresscheck($oAddressData, $this->getOperationMode(), AddressCheckType::BASIC);
        if ($oAddressData->getCity() == "FalscheStadt") {
            $oAddressData->setCity($response->getCity());
            return $oAddressData;
        }
        return true;
    }

Protect (Legacy)

Image Removed

Address Validation

Image Removed

Field

Description

Enabled

Activating the address check

Mode

Choice between Test / Live. This determines whether the PAYONE platform is addressed in Test or Live mode.

Check Billing Address

Configuration with which check the invoice address is to be checked.

Check Shipping Address

Configuration with which check the delivery address is to be checked.

Check Billing Address fpr virtual orders

Select yes/no whether the billing address should be checked for virtual orders.

Confirm address correction

Selection yes/no whether an address correction must be confirmed by the buyer

Person Status Mapping

Assignment of individual person status returns to a traffic light value

UI Text Box

Works only with the address check "Person", which returns personal information

Message to display for invalid data

Error message to be displayed at status "INVALID"

Response ERROR handling

What should be executed after an error in the extension or the PAYONE platform?

Minimum Order Total

Minimum amount to execute an address check.

Maximum Order Total

Maximum amount to execute an address check.

lifetime

Number of days in which no new address validation is performed.

Credit Assessment

Image Removed

Field

Description

Enabled

Activation of the credit rating check

Mode

Choice between Test / Live. This determines whether the PAYONE platform is addressed in Test or Live mode.

Integration Event

Selection of "Before/After" payment selection.

Credit rating check type

Selection of:

  • info score
    • hard criteria
    • all criteria
    • all criteria with boniscore
  • bon universe
    • verita score

Default values for unknown scores

Selection of a traffic light color for the return status "Unknown

only affects Boniversum verita score!

Confirm address correction

Selection yes/no whether an address correction must be confirmed by the buyer

Allowed Payment Method for "YELLOW/RED"

Multiple selection of the permitted payment type according to traffic light color

Sample Mode enabled

Selection of Yes/no and subsequent input for verification of each nth address.

Insufficient score error message

Message that is displayed to the customer when an insufficient score value is reached.

Response ERROR handling

What to do after an error in the integration or the PAYONE platform.

Minimum Order Total

Minimum amount to carry out a credit check.

Maximum Order Total

Maximum amount to carry out a credit check.

lifetime

Number of days in which no new address validation is performed.

UI Text Box
typeinfo

Service provider for address checks
Various service providers are available for address and creditworthiness checks. Our support team will be happy to explain the range of services of the individual checks and which service provider is the right one for you.

Other

Image Removed

Processing the Transaction Status

Image Removed

Field

Description

Valid PAYONE IPs

List of valid PAYONE IP addresses that may deliver a transaction status.
 After the installation, the currently valid IP addresses are specified there. Only change if necessary. You only need to add these addresses if your system landscape works with load balancers or proxy systems, for example. Please consult your admin or hosting service provider.

Forwarding the Transaction Status

Image Removed

Field

Description

forwarding

At this point you can define which status is forwarded to which URL and how long the timeout is in seconds until the redirection attempt is terminated.

Invoice information - Discount

Image Removed

Field

Description

SKU

Here you can define a SKU that shall be used to identify discount items. This can be left blank unless you are experiencing issues with shopping cart items

Invoice information - Shipping costs

Image Removed

Field

Description

SKU

Here you can define a SKU that shall be used to identify shipping items. This can be left blank unless you are experiencing issues with shopping cart items

Invoice Information - Credit Memo

Image Removed

Field

Description

SKU

Here you can define a SKU that shall be used to identify vouchers. This can be left blank unless you are experiencing issues with shopping cart items

Export configuration

Image Removed
A click on Export Configuration opens a download request of your browser.
Image Removed
You can now open this file with an XML editor and view or save it. This export is very important for every support request to the PAYONE team in order to avoid possible configuration problems. This file can also be used to determine whether any further extensions have been installed that could cause compatibility problems.

Orders

Image Removed

Overview

Image Removed
Here you will find a PAYONE-specific order overview similar to the Magento order overview. In addition to the standard information, you can view the payment status on the PAYONE platform, the exact type of payment (e.g. credit card brands) and, if applicable, the dunning status. A click on View opens the detailed view of the corresponding order.
Image Removed

Logs

Under the menu item Logs you'll find all information about processed payments and communication with the PAYONE platform.

Transactionstatus

Image Removed

Overview

Image Removed

The Transactions submenu item displays Magento received transaction status notifications for each order and transaction. These notifications are sent from the PAYONE platform to your shop. If there are any errors, you can find out here whether the transaction status was received correctly and what the current status is for a transaction. By clicking on View, you can display details on a transaction status.

Details

Image Removed

On the details page, you will see all the transaction status information transmitted through the PAYONE platform to your shop. Thus, you can always track which data your Magento shop has received and processed.
A detailed explanation of the respective parameters can be found in the technical documentation of the PAYONE platform in the PAYONE Merchant Interface (PMI) under Downloads > Documentation.

API

Image Removed

Overview

Image Removed

In this overview you will find all requests from the Magento shop to the PAYONE platform as well as the answers of the PAYONE platform to these requests. Only the requests that were transmitted to the PAYONE platform via Client API are not listed in this overview. This applies to credit card information that is transferred directly from the buyer's browser to the PAYONE platform using Ajax technology so that your shop does not come into contact with sensitive credit card information. By clicking on View, you can display an API request in detail.

Details

Image Removed

In the left column you can see the request that the Magento shop has sent to the PAYONE platform. On the right you will find the answer. A detailed explanation of the respective parameters can be found in the technical documentation of the PAYONE platform in the PAYONE Merchant Interface (PMI) under Downloads > Documentation.

Information and Support

Do you have any bugs or suggestions to improve the code of the extension? Open an issue in our Github repository: https://github.com/payone-gmbh
If you have any questions regarding the installation or use of the BS PAYONE Extension, please contact our Technical Support at the following contact details:

technical support

for technical questions

email

tech.support@bspayone.com

Phone

+49 431 259 68-500

Merchant Service

for billing and contract issues

email

merchantservice@bspayone.com

Phone

+49 431 259 68-200

Please note that PAYONE provides the extension for Magento free of charge and the free support of BS PAYONE therefore only contains general questions about the extension as well as the support for the BS PAYONE platform. For detailed questions, we recommend that you contact your Magento partner directly.

Image Removed

Integrationquickfacts
TXURLindex.php/payone/transactionstatus
Repohttps://github.com/PAYONE-GmbH/magento-2/releases
Version2.6.0
Systemmagento2

Table of Contentsoutlinetrueindent2em


Linchpin Teaser
titleEnglish
type7
urlhttps://docs.payone.com/x/kYkjAg
Integration Guide Magento 2



Linchpin Teaser
titleDeutsch
type7
urlhttps://docs.payone.com/x/w4kjAg
Integrationsanleitung Magento 2