payone-gmbh / shopware-6 Goto Github PK
View Code? Open in Web Editor NEWPAYONE Payment Plugin for Shopware 6
License: MIT License
PAYONE Payment Plugin for Shopware 6
License: MIT License
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:
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.
do you support headless? Do you provide API routes for credit card where I can provide card data from my front shop?
The link in the readme.md is broken. It should link to the extensive online documentation of this plugin, but it shows a 404 page.
Link: https://docs.payone.com/display/public/INT/Shopware+6+Plugin
Location in readme.md: Line 41
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;
The issue: #243 still persists. Unfortunately the original issue was marked as stale and closed. Could you please have another look at this?
The plugin uses getenv to get the environment variable. This is totally wrong and the code should inject environment variables using DI with %env(APP_URL)% as example with an default set here
https://symfony.com/doc/current/configuration/env_var_processors.html
pls assign automatically
We installed the newest version 2.4.0 which seems to not be officially released yet and get the following error:
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:
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 :-)
I am not able to change customFields.payone_clearing_bank_account data for the invoice document.
It is used here
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
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:
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
The plugin uses getenv
to get the environment variable. This is totally wrong and the code should inject environment variables using DI with %env(APP_URL)%
as example with an default set here
https://symfony.com/doc/current/configuration/env_var_processors.html
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:
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
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.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)"} []
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.
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!
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:
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.
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:
Updated version for Shopware 6.5:
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:
=> url is stored, txactions stays empty
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.
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)
Hi.
I want to add the invoice reference to the order confirmation template.
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
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.
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.
Hi,
In this line the class Sinergi\BrowserDetector\Browser
is used:
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
.
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!
assigne me pls
Can you please release the version 2.3.2 on packagist too?
In order to install that version via composer
thanks
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.
Plugin is relying on constants that don't exists anymore, for example Shopware\Core\System\StateMachine\Aggregation\StateMachineTransition\StateMachineTransitionActions::ACTION_PAY_PARTIALLY
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.
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...
It seems like https://github.com/PAYONE-GmbH/shopware-6/releases/tag/v2.3.0 breaks the change of the payment-status in shopware or just doesn't get the right feedback from the merchant interface.
You can place an order and pay it, but the order never changes its status to "paid".
I'm on Shopwar 6.4.2.1 and just updated the plugin in the shopware backend to 2.3.0.
Are you able to reproduce this issue?
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
Hello guys,
when can i update the plugin to 6.4.7.0?
Thanks
Sebastian
Hey @hreinberger @janteuber,
I maintain gitleaks and we noticed that you are not pinning your gitleaks-action version, but rather using gitleaks-action@master and wanted to give you a heads up that we are planning to merge v2 to master soon, which is a breaking update. See more details here. By the way, we think you'll love v2's features. Let us know if you have any questions!
pls assign to somebody other than fjbender
Hello, is this plugin ready for the pwa-integration in shopware?
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!
The tags for this repo are not following the packagist rules for auto sync. See https://packagist.org/about => "Managing package versions".
They should be renamed to "v.1.0.0-RC2" or "1.0.0-RC2". Currently it's not possible to get the latest tag with composer.
If core.loginRegistration.requireDataProtectionCheckbox
is enabled, PayPal Express Checkout is not working. The parameter acceptedDataProtection
needs to be set but is not provided by PayPal.
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:
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.
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.
Add the url to the sales_channel as well: https://example.com/ without DE at the end.
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
Hey,
I got a db dump where the table payone_payment_redirect
is 1,3GB. It would be nice to have a cleanup task for this 😂
on shopware 6.3.5.0, when testing the API-credentials in the admin backend of shopware, suddenly I get this error message: "payone-payment.settingsForm.messageTestError.paydirekt"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.