private function processProducts($details)
    {
        $result = array();

        if (!array_key_exists('permissions', $details)) {
            return $result;
        }

        $products_to_check = array(
            'ideal' => 'ideal',
            'bank-transfer' => 'banktransfer',
            'bancontact' => 'bancontact',
            'cash-on-delivery' => 'cashondelivery',
            'credit-card' => 'creditcard',
            'paypal' => 'paypal',
            'homepay' => 'homepay',
            'klarna' => 'klarna',
            'sofort' => 'sofort',
            'payconiq' => 'payconiq',
            'afterpay' => 'afterpay'
        );

        foreach ($products_to_check as $permission_id => $id) {
            if (array_key_exists('/payment-methods/'.$permission_id.'/', $details['permissions']) &&
                array_key_exists('POST', $details['permissions']['/payment-methods/'.$permission_id.'/']) &&
                $details['permissions']['/payment-methods/'.$permission_id.'/']['POST']
            ) {
                $result[] = $id;
            }
        }

        return $result;
    }