GithubHelp home page GithubHelp logo

payone-gmbh / shopware-6 Goto Github PK

View Code? Open in Web Editor NEW
14.0 14.0 18.0 5.02 MB

PAYONE Payment Plugin for Shopware 6

License: MIT License

PHP 78.54% JavaScript 13.91% Twig 7.22% SCSS 0.33%
payment payment-gateway payment-processing payment-service payment-solution payone shopware shopware-plugin shopware6

shopware-6's People

Contributors

amirinterlutions avatar andrepayone avatar anton-levitsky avatar boxblinkracer avatar clarissa-minkwitz avatar dmetoglou avatar fjbender avatar hreinberger avatar hummer2k avatar itl-mluedecke avatar janteuber avatar jochenmanz avatar jvarelmann avatar kellerkindandre avatar kleinmann avatar kswzr avatar lx-wnk avatar momocode-de avatar patchee500 avatar rommelfreddy avatar schrank avatar sironheart avatar t-kuchel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

shopware-6's Issues

Snippets are missing in shopware 6.4.0.0 and above

We have a 6.4.3.1 Shop with the version 2.4.1 of the Payone plugin. All payone snippets are missing in the database. I think the problem is that the way you install the snippets is not working anymore since shopware 6.4.0.0. You have a folder "Resources/translations" and you install the snippets with PHP files that are tagged with "shopware.snippet.file". But this tag is not handled anymore since 6.4.0.0. You should use the auto detection like it is described here:

https://developer.shopware.com/docs/guides/plugins/plugins/storefront/add-translations#snippet-file-structure

So I think you just need to rename the "Resources/translations" directory to "Resources/snippet". That should be enough and then you can delete the PHP services.

headless support

do you support headless? Do you provide API routes for credit card where I can provide card data from my front shop?

Deleting a customer from the backend is not possible

As a user, it is not possible for me to delete a customer. The current database structure will result in an internal server error. Is this the expected behavior or could the table schema be modified?

CREATE TABLE `payone_payment_card` (
  `id` binary(16) NOT NULL,
  `customer_id` binary(16) NOT NULL,
  `pseudo_card_pan` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `truncated_card_pan` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `expires_at` datetime NOT NULL,
  `created_at` datetime(3) NOT NULL,
  `updated_at` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx.payone_payment_card.expires_at` (`expires_at`),
  KEY `fk.payone_payment_card.customer_id` (`customer_id`),
  CONSTRAINT `fk.payone_payment_card.customer_id` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

ZeroAmountCartValidator shows misleading error

We installed the newest version 2.4.0 which seems to not be officially released yet and get the following error:
image

We only use Payone Payment methods, therefore we can not change the default away from payone.

I don't understand what the purpose of \PayonePayment\Components\CartValidator\ZeroAmountCartValidator::validate is, but in our case it is adding this weird error message to the cart. Technically it is right, that one is not allowed to checkout with a total of 0, but the customer doesn't understand this.

The problem is, even if we have something in the cart, the error doesn't go away:
image

For the moment I'll just remove the whole class and it's validation, but if you can tell me, that the idea behind it is, I might change my decision :-)

Cant change prepayment clearing_bank_account data in invoice document

I am not able to change customFields.payone_clearing_bank_account data for the invoice document.
It is used here

{% if constant('PayonePayment\\PaymentMethod\\PayonePrepayment::UUID') == order.transactions.first.paymentMethod.id %}

Kontoinhaber: Test Nutzer
IBAN: DE00123456782599100003
BIC: TESTTEST
Verwendungszweck: 544153452

How can i change this. I found the current data in "SettingsController.php" but it shouldnt be changed there.
Any hints?

We are working with SW 6.4.1.0 and PayOne 2.2.0

parent function in component for compati

Hi,

short question:
Is it possible for you guys to use parent function in components templates?
This way it is still possible for extensions called before to add information to blocks.

For instance in this case:

https://github.com/PAYONE-GmbH/shopware-6/blob/master/src/Resources/app/administration/src/module/sw-order/component/sw-order-user-card/sw-order-user-card.html.twig

If we wanted to add some information to the payment label or type, it'll be always overridden by your extension.
Imho, it would be a better approach to use parent. In that case other third-party-plugins can still override the template without any issues.
Still not very neat, but since we can't define any priorities to component overriding, this would help a little.
(shopware/shopware#2210)

{% block sw_order_detail_base_secondary_info_payment %}
    {% parent %}
    <template v-if="payoneCardType">
        <dd>
            {{ $tc('sw-order.payone-payment.creditCard.cardTypeLabel') }}: {{ payoneCardType }}
        </dd>
    </template>
{% endblock %}

thank you :)

best regards

Frontend JS not loaded on checkout confirm?

Hi,

I am trying out the plugin for a new shop installation – I used PAYONE before, but never in Shopware 6.
So I installed it according to your docs, but on the checkout page I just have disabled fields:

Capture 2021-01-28_15-50-21

There is no JS that is loaded from anything related to PAYONE, so I guess this might be the problem?

I found the frontend dist file here: https://github.com/PAYONE-GmbH/shopware-6/blob/master/src/Resources/app/storefront/dist/storefront/js/payone-payment.js but it is not used anywhere in the code? Or am I missing something?

I would be really happy if you could help me, I can provide you with more details of course.

Thanks

Typing error in translations snippet

custom/plugins/PayonePayment/src/Resources/translations/de_DE/messages.de-DE.json :: 24
"pageSubTitle": "Hier können Sie die gespeicerten Kreditkarten verwalten.",

there is missing an h in gespeicerten should be gespeicherten

"pageSubTitle": "Hier können Sie die gespeicherten Kreditkarten verwalten.",

Please check for more errors! Thanks!

Shopware 6.5, error activating plugin after migration of shopware

Shopware 6.5.5.2
Payone: 5.0.2
PHP: 8.2.7

I migrated shopware from 6.4.20.2 to 6.5.5.2. Then i upgraded the payone plugin to version 5.0.2.
When activating the payone plugin, the following error occurs:

php.CRITICAL: Uncaught Error: Class "PayonePayment\DataAbstractionLayer\Extension\PayonePaymentOrderTransactionExtension" not found {"exception":"[object
] (Error(code: 0): Class \"PayonePayment\\DataAbstractionLayer\\Extension\\PayonePaymentOrderTransactionExtension\" not found at /var/www/shopware/test/var/cache/prod_hdf33e705b
f2c89a96f784bdc50d28cd0/ContainerGPGVCuP/Shopware_Core_KernelProdContainer.php:8068)"} []

ErrorCode: 911

I am testing the payone plugin for shopware and I get the following error message.

"response":{"Status":"ERROR","Error"
:{"ErrorCode":"911","ErrorMessage":"Reference number already exists"

Upon googling I found a similar issue, PAYONE-GmbH/magento-1#232 but I didn't find any solution

The plugin was working until yesterday and today no payment is going through, I have tried different test cards.

Recurring payment for subscriptions with credit cards

Hello,

I want to ask if recurring payments with credit cards are possible in Shopware 6?

I am developing a subscription module for Shopware 6 for my customer with Payone as the payment provider. When I look at the documentation (https://docs.payone.com/display/public/PLATFORM/Special+remarks+-+Recurring+transactions+credit+card), there are certain fields in the documentation like "recurrence" or "customer_is_present", which should also appear in your Shopware 6 plugin. But if you look at the code, these fields do not exist. In your Shopware 5 plugin they do.

Do you have more info for me? Thanks in advance!

payment error not logged

I have a case where i need to handle a payment for a client using his credit card for usa. It seems like that so far we have no issues with other countries so this could be something very specific.

However, my client is not able to finish the transaction as the only message he gets is:

image

After checking the payment logs in var/log/payone_payment_prod* and var/log/prod* in general i still was not able to identify this issue. Is there a way to have a more detailed error reporting? Maybe a hint to start debugging this would also be helpful.

Environment variable APP_SECRET

I performed a Shopware update from 6.3 to 6.4.20.2 using Symfony Flex yesterday and accordingly installed the appropriate Payone version via composer. However, after the update, the variable "APP_SECRET" could no longer be found, which caused issues with the payment methods.

I couldn't determine whether Shopware no longer executes putenv from version 6.4 onwards or if it has something to do with the Dotenv class from Symfony, where $usePutenv is set to false by default.

Is it possible for you to provide an update for the 6.4 version to address this issue? In the 6.5 version, you have already updated it.

Other issues related to this topic:
#271
#243

Version for Shopware 6.4:

$secret = getenv('APP_SECRET');

$secret = getenv('APP_SECRET');

Updated version for Shopware 6.5:

if (empty($this->appSecret)) {

Transaction Forwarding => txactions cannot be saved

we´ve gone live with Plugin Version 4.2 recently and need to forward the transactions to our ERP System.

When I try to save the txactions to be forwarded they disappear right after I click on the save button.

Steps to reproduce:

  • Add new Notification Forward
  • enter URL
  • enter txactions
  • press save

=> url is stored, txactions stays empty

PayOne Secure Invoice does not take shipping costs into account when building article list

When sending an authorization or preauthorization request for the secure invoice payment method the article list is not properly assembled. The payone api returns a 1610 - Article list faulty or incomplete. To me this appears to be caused by the shipping costs never being added to the article list. Should be somewhere along \PayonePayment\Payone\Request\SecureInvoice\AbstractSecureInvoiceAuthorizeRequestFactory::getRequestParameters I guess, but I don't see anything the likes of it.

Headless support

Hello any updates regarding this? Maybe you have some new cases, examples, clients who use headless?

Hi, we've developed the plugin with headless use cases in mind, but haven't had a full project using it yet. For credit card payments, you should use our JS library and the [hosted iFrames](https://docs.payone.com/display/public/INT/Modern+Credit+Card+Checkout) in your checkout. This way, you can safely tokenize credit card data with only the client and PAYONE systems involved. The actual payment request from the shop can then use the credit card token instead of live credit card data.

Other payment methods that have frontend components like certain BNPL types or SEPA direct debit could also be a bit more challenging to implement.

We'd love to support you on your journey to running shopware 6 headless with our plugin though. If you have any specific questions, feel free to contact us at integrations[at]payone[dot]com

Originally posted by @hreinberger in #189 (comment)

invoice -> clearing reference in confirmation mail

Hi.

I want to add the invoice reference to the order confirmation template.

  • From the transaction customFields: payone_transaction_data -> [date] -> response -> clearing -> Reference

But I keep getting null for the customFields.

Therefore I checked the database entry and I could see that the transaction gets updated, only seconds (milliseconds) after it's creation.

Therefore I have the following assumtion:
The customFields for the order_transaction gets added a few seconds after the orderConfirmation Email gets processed.
And therefore I get a null on the customFields.

Is that correct?

How can I add the Reference number to the order confirmation email????

Greets axe

ApplePay Error after Login in checkout

we have unfortunately just found out through testing that the current Payone plugin (v2.2.1) for Shopware 6.4.4.1 is buggy and the entire checkout throws an error with it. See screenshot.
Attempted-to-load-class-Browser-from-namespace-Sinergi_BrowserDetector-Did-you-forget-a-use-statement-for-another-namespace-500-Internal-Server-Error-
As soon as a user is logged in and then goes to the shopping cart or checkout, the error is thrown. Without logging in, the shopping cart can be viewed.

[Breaking Change] Missing dependency -> hard failure

Hi,

In this line the class Sinergi\BrowserDetector\Browser is used:

$browser = (new Browser($userAgent))->getName();

However the package is not in the required packages and there is no class_exists() check around it.
This means, that upgrading to the newest version just fails hard all the time, as there is a required dependency that is no registered in composer.json.

Labels for Statusmappings in Administration missing in Shopware 6.3.5.2

Hi,

i recently integrated PayOne into Shopware 6.3.5.2. Unfortunately the Labels within the Statusmapping-Section aren't visible.

I was able to pin it down to the payone-settings-Snippet from ./Resources/app/administration/module/page/payone-settings.html.twig:136:

<sw-form-field-renderer
    v-if="element.name.startsWith('PayonePayment.settings.paymentStatus')"
    :config="{
        componentName: 'sw-single-select',
        label: getInlineSnippet(element.config.label),
        helpText: getInlineSnippet(element.config.helpText),
        options: stateMachineTransitionActions,
    }"
    v-model="config[element.name]"
/>

The part where the label is set doesn't seem to work. The options were generated though.

Do you have any ideas how this could be solved?

Thank you in advance!

Capturing transactions with discounted shipping costs is not possible (PayOne Secure Invoice in Preauthorization Mode)

This behavior has been observed with the payone_secure_invoice_payment_handler payment method.
Shopware Version is 6.5.8.5, Plugin Version is 3.0.0.

Steps to reproduce:

Configure payone_secure_invoice_payment_handler payment method to work in preauthorization mode.
Configure shop to use shipping costs, e.g. 6€ for each order.
Configure a discount rule that grants a (fixed) discount on the shipping costs, e.g. -4€.

Carry out some order (make sure the discount is applied) and wait for webhook response, marking order ready for capture.
Try to capture the order, e.g. via the Shopware Admin interface.

Expected behavior:

Order should be captured fine and capture should be visible in Payone Merchant Interface.

Actual behavior:

Order is not captured. Capture Request ist sent to Payone but returns with Error 1610 "Article list faulty or incomplete".

I guess the problem here is that the logic to assemble the cart contents that are sent over to Payone do not add up properly due to the discount being a 0.00 (€) value item.
For discounts on shipping costs the discount value (so the -4€ from the example above) is not held as a negative amount in a line item (there is a line item, but it's value is 0.00) but rather in an additional delivery (There will then be two deliveries for one order).

Here is an example of an order that I tested:

Line Items (values include vat):

1: Some Product: 73,52
2: Discount on Cart: -11,03
3: Discount on Shipping: -4,00

Shipping Costs: 10,98
Order Total: 69,47

The payload that is being sent over to Payone for this order looks like this:

{
  "ip": "127.0.0.1",
  "aid": "XXX",
  "key": "XXX",
  "mid": "XXX",
  "zip": "XXX",
  "city": "XXX",
  "hash": "XXX",
  "mode": "test",
  "de[1]": "Product",
  "de[2]": "Discount on Cart",
  "de[3]": "Discount on Shipping",
  "de[4]": "Shipping Costs",
  "email": "XXX",
  "id[1]": "XXX",
  "id[2]": "XXX",
  "id[3]": "XXX",
  "id[4]": 4,
  "it[1]": "goods",
  "it[2]": "voucher",
  "it[3]": "voucher",
  "it[4]": "shipment",
  "no[1]": 1,
  "no[2]": 1,
  "no[3]": 1,
  "no[4]": 1,
  "pr[1]": 7352,
  "pr[2]": -1103,
  "pr[3]": 0,
  "pr[4]": 1098,
  "va[1]": 1900,
  "va[2]": 1900,
  "va[3]": 0,
  "va[4]": 1900,
  "amount": 6947,
  "street": "XXX",
  "country": "DE",
  "request": "preauthorization",
  "birthday": "XXX",
  "currency": "EUR",
  "encoding": "UTF-8",
  "language": "de",
  "lastname": "XXX",
  "portalid": "XXX",
  "firstname": "XXX",
  "reference": "XXX",
  "salutation": "XXX",
  "api_version": "3.10",
  "clearingtype": "rec",
  "solution_name": "kellerkinder",
  "narrative_text": "XXX",
  "clearingsubtype": "POV",
  "integrator_name": "shopware6",
  "businessrelation": "b2c",
  "solution_version": "5.0.2",
  "integrator_version": "6.5.8.5"
}

As can be seen from the above payload, there is no mention of the shipping discount (It should be -400 somewhere).
7352 - 1103 + 1098 equal 7347 and not the 6947 that are being sent over as amount. A deduction of -400 is missing and thus the complaint from Payone seems valid.
If I place the same order without the shipping discount, the order can be captured without issues.

The mixin "listing" is not registered

I installed the latest version today via the Shopware - Admin (SW Version 6.4.7.0) and it broke our Admin, the page stays blank after login.

See screenshot for browser messages.

grafik

Support for Shopware 6.4 | PHP8

Plugin is relying on constants that don't exists anymore, for example Shopware\Core\System\StateMachine\Aggregation\StateMachineTransition\StateMachineTransitionActions::ACTION_PAY_PARTIALLY

Inquiry: Store-API Endpoints Support for Integrating PAYONE with Shopware 6 Headless Frontends

Hello PAYONE Team,

I am currently exploring the integration of the PAYONE payment service provider with Shopware 6, specifically for the new headless Shopware 6 frontends as provided by https://github.com/shopware/frontends/. I'm reaching out to inquire about the compatibility and support of the PAYONE Shopware 6 plugin in this context.

Could you please confirm if the Shopware 6 plugin (found in this repository) offers the necessary Store-API endpoints that are required for a seamless integration with the headless Shopware 6 frontends?

Additionally, if these endpoints are available, could you kindly provide some documentation or guidance on how to best implement this integration?

Thank you for your assistance and I look forward to your response.

Shopware 6.4.2 Support

Moin.
Can you give us a hint how long it will take to serve the 6.4.2 Support of the Plugin?
We planed to upgrade this week to 6.4.2 as we sadly just recognized, that only 6.4.1 is supported...

Error in PayoneModule 2.3.1

Hi.

I keep getting the following error:

[2021-09-06T04:05:04.148661+00:00] php.CRITICAL: Uncaught Error: Argument 1 passed to PayonePayment\Components\Currency\CurrencyPrecision::getRoundedTotalAmount() must be of the type float, string given, called in /var/www/LIVE/custom/plugins/PayonePayment/src/Components/DataHandler/Transaction/TransactionDataHandler.php on line 224 {"exception":"[object] (TypeError(code: 0): Argument 1 passed to PayonePayment\\Components\\Currency\\CurrencyPrecision::getRoundedTotalAmount() must be of the type float, string given, called in /var/www/LIVE/custom/plugins/PayonePayment/src/Components/DataHandler/Transaction/TransactionDataHandler.php on line 224 at /var/www/LIVE/custom/plugins/PayonePayment/src/Components/Currency/CurrencyPrecision.php:41)"} []

What can be the problem here?

Greets

Update to 6.4.7.0

Hello guys,

when can i update the plugin to 6.4.7.0?

Thanks

Sebastian

newer issue

pls assign to somebody other than fjbender

PWA-ready?

Hello, is this plugin ready for the pwa-integration in shopware?

Credit card form template is missing in non german language

Hi,

we experienced an issue where english customers (or at least non german based shops) aren't able to see the Credit Card Form Template in the checkout process.

We are using Shopware v6.3.5.2 and the latest Payone Extension v2.1.0.

it seems that for non german customers the following detection isn't working:

if (!$this->isPayonePayment($context->getPaymentMethod())) {
    return;
}

This check can be found in PayonePayment\EventListener\CheckoutConfirmTemplateListener at line 31.

This method basically checks if the PaymentMethodEntity - as a result from $context->getPaymentMethod() - contains a CustomField with the key payone_payment. This result is empty for the English version in our Project, but filled for the German version. Therefore the Template isn't shown, which prevents customers from adding their card data.

Can you confirm this issue and do you maybe have a quick solution for this problem?

Thank you in advance!

Unable to find a matching sales channel for the request

Maybe this is already fixed, but just in case someone has the same problem...

We ran in an issue right after placing an order with Shopware 6.3.5.4 and Payone 2.3.1:

image

Oops! An Error Occurred

The server returned a "500 Internal Server Error".

Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

What happend?

For some reason the redirect url of payone is wrong:

https://example.com/payone/redirect?hash=ODQ1ODcxNDZiZjJiZTFjNDQ1NzI3Njc4ZjE4ZGMzNGFjYjA4OWQxNmRkZTkyZjEzMGJiNzZiNDJlMjQxYWI4ZA%3D%3D

but it should be

https://example.com/DE/payone/redirect?hash=ODQ1ODcxNDZiZjJiZTFjNDQ1NzI3Njc4ZjE4ZGMzNGFjYjA4OWQxNmRkZTkyZjEzMGJiNzZiNDJlMjQxYWI4ZA%3D%3D

This leads to an interesting bug, which ended in the above error - which is not a symfony error page and I was unable to find any log, neither php, apache, mysql, nothing. Took a while to find, hence this post, so someone might have a shorter way in the future.

Solution:

Add the url to the sales_channel as well: https://example.com/ without DE at the end.

TL;DR

Make sure the redirect url is correct, for some reason in our case one is chosen which is not attached to the sales_channel.

The 500 error can be reproduced by setting in \Shopware\Storefront\Framework\Routing\RequestTransformer::transform $salesChannel null

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.