{"id":318488,"date":"2021-12-31T11:39:12","date_gmt":"2021-12-31T11:39:12","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=318488"},"modified":"2021-12-31T11:39:26","modified_gmt":"2021-12-31T11:39:26","slug":"how-to-integrate-the-payment-method-in-shopware-6","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/how-to-integrate-the-payment-method-in-shopware-6\/","title":{"rendered":"How to integrate the payment method in Shopware 6"},"content":{"rendered":"\n<p>In this blog, you are going to learn \u201cHow to integrate the payment method in shopware 6.\u201d<br>I hope you know the directory structure of\u00a0<a href=\"https:\/\/webkul.com\/blog\/create-product-and-product-variant-in-shopware-6\/\">Shopware<\/a>\u00a06 plugin, if you don\u2019t know, see here-\u00a0<a rel=\"noreferrer noopener\" href=\"https:\/\/webkul.com\/blog\/create-product-and-product-variant-in-shopware-6\/\" target=\"_blank\">https:\/\/docs.shopware.com\/en\/shopware-platform-dev-en\/internals\/directory-structure<\/a>.<\/p>\n\n\n\n<p>There is a two way of integrate the payment methods:-<br>one is Synchronous and second is Asynchronous.<\/p>\n\n\n\n<p>Both interface method contains transaction id, order details, amount, a return URL , payment method information and language information.<br>In the Asynchronous interface handler return the redirect  response  to redirect the customer to an external  payment provider. It also contain the return URL. External API return the error <code>AsyncPaymentProcessException<\/code> so that Shopware handle the exception.<br>In the Synchronous interface handler doesn&#8217;t return the any redirect response. It basically use for internal purpose. You can used them according to your need.<\/p>\n\n\n\n<p>Let&#8217;s take the example of synchronous methods:-<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">TestPaymentHandler.php<\/h6>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php declare(strict_types=1);\n\nnamespace Webkul\\Test\\Service;\n\nuse Shopware\\Core\\Checkout\\Payment\\Cart\\PaymentHandler\\SynchronousPaymentHandlerInterface;\nuse Shopware\\Core\\Checkout\\Payment\\Cart\\SyncPaymentTransactionStruct;\nuse Shopware\\Core\\Checkout\\Order\\Aggregate\\OrderTransaction\\OrderTransactionStateHandler;\nuse Shopware\\Core\\Framework\\Context;\nuse Shopware\\Core\\Framework\\Validation\\DataBag\\RequestDataBag;\nuse Shopware\\Core\\System\\SalesChannel\\SalesChannelContext;\nuse Shopware\\Core\\Framework\\DataAbstractionLayer\\EntityRepositoryInterface;\nuse Shopware\\Core\\Framework\\DataAbstractionLayer\\Search\\Criteria;\nuse Shopware\\Core\\Framework\\DataAbstractionLayer\\Search\\Filter\\EqualsFilter;\n\nclass TestPaymentHandler implements SynchronousPaymentHandlerInterface\n{\n    \/**\n     * @var OrderTransactionStateHandler\n     *\/\n    private $transactionStateHandler;\n\n    \/**\n     * @var EntityRepositoryInterface\n     *\/\n    private $testRepository;\n\n    public function __construct(\n        OrderTransactionStateHandler $transactionStateHandler,\n        EntityRepositoryInterface $testRepository\n    )\n    {\n        $this-&gt;transactionStateHandler = $transactionStateHandler;\n        $this-&gt;testRepository = $testRepository;\n    }\n\n    public function pay(SyncPaymentTransactionStruct $transaction, RequestDataBag $dataBag, SalesChannelContext $salesChannelContext): void\n    {   \n        \/\/ demo example you can do your logic\n        $test = $this-&gt;testRepository-&gt;search(\n            (new Criteria())\n            -&gt;addFilter(new EqualsFilter(&#039;customerId&#039;, $salesChannelContext-&gt;getCustomer()-&gt;getId())),\n            Context::createDefaultContext()\n        )-&gt;first();\n\n        $updatetest = &#091;\n            &#039;id&#039; =&gt; $test-&gt;getId(),\n            &#039;amount&#039; =&gt; (float)($test-&gt;getAmount() - ($transaction-&gt;getOrderTransaction()-&gt;getAmount()-&gt;getTotalPrice()\/ $salesChannelContext-&gt;getCurrency()-&gt;getFactor()))\n        ];\n\n        $this-&gt;testRepository-&gt;upsert(&#091;$updatetest], Context::createDefaultContext());\n\n        \/\/SyncPaymentProcessException\n        $context = $salesChannelContext-&gt;getContext();\n        $this-&gt;transactionStateHandler-&gt;paid($transaction-&gt;getOrderTransaction()-&gt;getId(), $context);\n       \/\/do your stuff\n    }\n}<\/pre>\n\n\n\n<p>Create your own payment handler class and implements <code>SynchronousPaymentHandlerInterface<\/code> so that when you go with checkout process this class is called and add the tag <code>shopware.payment.method.sync<\/code> from the tag shopware knows that service is type of synchronous  payment handler and must register your payment handler service in the services.xml file.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">services.xml<\/h6>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?xml version=&quot;1.0&quot; ?&gt;\n\n&lt;container xmlns=&quot;http:\/\/symfony.com\/schema\/dic\/services&quot;\n           xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot;\n           xsi:schemaLocation=&quot;http:\/\/symfony.com\/schema\/dic\/services http:\/\/symfony.com\/schema\/dic\/services\/services-1.0.xsd&quot;&gt;\n\n    &lt;services&gt;\n        &lt;service id=&quot;Webkul\\Test\\Service\\TestPaymentHandler&quot;&gt;\n            &lt;argument type=&quot;service&quot; id=&quot;Shopware\\Core\\Checkout\\Order\\Aggregate\\OrderTransaction\\OrderTransactionStateHandler&quot;\/&gt;\n            &lt;argument type=&quot;service&quot; id=&quot;wk_test.repository&quot; \/&gt;\n            &lt;tag name=&quot;shopware.payment.method.sync&quot; \/&gt;\n        &lt;\/service&gt;\n\n        &lt;service id=&quot;Webkul\\Test\\Core\\Content\\Test\\TestDefinition&quot;&gt;\n            &lt;tag name=&quot;shopware.entity.definition&quot; entity=&quot;wk_test&quot; \/&gt;\n        &lt;\/service&gt;\n\n    &lt;\/services&gt;\n&lt;\/container&gt;<\/pre>\n\n\n\n<p>Your handler is not handling any payment method, so create payment method.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">WebkulTest.php<\/h6>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php declare(strict_types=1);\n\nnamespace Webkul\\Test;\n\nuse Shopware\\Core\\Framework\\Context;\nuse Shopware\\Core\\Framework\\DataAbstractionLayer\\EntityRepositoryInterface;\nuse Shopware\\Core\\Framework\\DataAbstractionLayer\\Search\\Criteria;\nuse Shopware\\Core\\Framework\\DataAbstractionLayer\\Search\\Filter\\EqualsFilter;\nuse Shopware\\Core\\Framework\\Plugin;\nuse Shopware\\Core\\Framework\\Plugin\\Context\\ActivateContext;\nuse Shopware\\Core\\Framework\\Plugin\\Context\\DeactivateContext;\nuse Shopware\\Core\\Framework\\Plugin\\Context\\InstallContext;\nuse Shopware\\Core\\Framework\\Plugin\\Context\\UninstallContext;\nuse Shopware\\Core\\Framework\\Plugin\\Util\\PluginIdProvider;\nuse Shopware\\Core\\Framework\\Uuid\\Uuid;\nuse Webkul\\Test\\Service\\TestPaymentHandler;\nuse Doctrine\\DBAL\\Connection;\n\nclass WebkulTest extends Plugin\n{\n    public function install(InstallContext $context): void\n    {   \n       $this-&gt;addPaymentMethod($context-&gt;getContext());\n    }\n\n    public function uninstall(UninstallContext $context): void\n    {\n        $this-&gt;setPaymentMethodIsActive(false, $context-&gt;getContext());\n\n        parent:: uninstall($context);\n        if ($context-&gt;keepUserData()) {\n            return;\n        }\n        \n        $connection = $this-&gt;container-&gt;get(Connection::class);\n        $connection-&gt;executeUpdate(&#039;DROP TABLE IF EXISTS `wk_test`&#039;);\n\n    }\n\n    public function activate(ActivateContext $context): void\n    {\n        $this-&gt;setPaymentMethodIsActive(true, $context-&gt;getContext());\n        parent::activate($context);\n    }\n\n    public function deactivate(DeactivateContext $context): void\n    {\n        $this-&gt;setPaymentMethodIsActive(false, $context-&gt;getContext());\n        parent::deactivate($context);\n    }\n\n    private function addPaymentMethod(Context $context): void\n    {\n        $paymentMethodExists = $this-&gt;getPaymentMethodId();\n\n        if ($paymentMethodExists) {\n            return;\n        }\n\n        \/** @var PluginIdProvider $pluginIdProvider *\/\n        $pluginIdProvider = $this-&gt;container-&gt;get(PluginIdProvider::class);\n        $pluginId = $pluginIdProvider-&gt;getPluginIdByBaseClass(get_class($this), $context);\n        $languageRepo = $this-&gt;container-&gt;get(&#039;language.repository&#039;);\n        $languageEN = $languageRepo-&gt;search((new Criteria())-&gt;addFilter(new EqualsFilter(&#039;name&#039;,&#039;English&#039;)),Context::createDefaultContext())-&gt;first()-&gt;getId();\n        $languageDE = $languageRepo-&gt;search((new Criteria())-&gt;addFilter(new EqualsFilter(&#039;name&#039;,&#039;Deutsch&#039;)),Context::createDefaultContext())-&gt;first()-&gt;getId();\n\n        $paymentId = Uuid::randomHex();\n        $PaymentData = &#091;\n            &#039;id&#039; =&gt; $paymentId,\n            &#039;handlerIdentifier&#039; =&gt; TestPaymentHandler::class,\n            &#039;pluginId&#039; =&gt; $pluginId,\n            &#039;name&#039; =&gt; &#039;Test payment&#039;,\n            &#039;description&#039; =&gt; &#039;Payment&#039;\n        ];\n\n        \/** @var EntityRepositoryInterface $paymentRepository *\/\n        $paymentRepository = $this-&gt;container-&gt;get(&#039;payment_method.repository&#039;);\n        $paymentTransRepository = $this-&gt;container-&gt;get(&#039;payment_method_translation.repository&#039;);\n        \n        $paymentRepository-&gt;create(&#091;$PaymentData], $context);\n\n        $paymentTransRepository-&gt;upsert(&#091;\n            &#091;\n                &#039;paymentMethodId&#039; =&gt; $paymentId,\n                &#039;languageId&#039; =&gt; $languageEN,\n                &#039;name&#039; =&gt; &#039;Test Payment&#039;,\n                &#039;description&#039; =&gt; &#039;Payment&#039;\n            ],\n            &#091;\n                &#039;paymentMethodId&#039; =&gt; $paymentId,\n                &#039;languageId&#039; =&gt; $languageDE,\n                &#039;name&#039; =&gt; &#039;Test Payment&#039;,\n                &#039;description&#039; =&gt; &#039;Zahlung&#039;\n            ]\n        ], $context);\n    }\n\n    private function setPaymentMethodIsActive(bool $active, Context $context): void\n    {\n        \/** @var EntityRepositoryInterface $paymentRepository *\/\n        $paymentRepository = $this-&gt;container-&gt;get(&#039;payment_method.repository&#039;);\n\n        $paymentMethodId = $this-&gt;getPaymentMethodId();\n\n        if (!$paymentMethodId) {\n            return;\n        }\n\n        $paymentMethod = &#091;\n            &#039;id&#039; =&gt; $paymentMethodId,\n            &#039;active&#039; =&gt; $active,\n        ];\n\n        $paymentRepository-&gt;update(&#091;$paymentMethod], $context);\n    }\n\n    private function getPaymentMethodId(): ?string\n    {\n        \/** @var EntityRepositoryInterface $paymentRepository *\/\n        $paymentRepository = $this-&gt;container-&gt;get(&#039;payment_method.repository&#039;);\n\n        $paymentCriteria = (new Criteria())-&gt;addFilter(new EqualsFilter(&#039;handlerIdentifier&#039;, TestPaymentHandler::class));\n        return $paymentRepository-&gt;searchIds($paymentCriteria, Context::createDefaultContext())-&gt;firstId();\n    }\n}<\/pre>\n\n\n\n<p>The payment method can be added to the system while installing your plugin in  the <code>install<\/code> method, you actually start by creating a new payment method. he <code>activate<\/code> method and <code>deactivate<\/code> method just do that, activating and deactivating the payment method.<br><br>Now your payment method is created and payment handler service is working with your payment method.<br><br>Hope it will help you. Thanks for reading. Happy Coding \ud83d\ude42<br>Thank You.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this blog, you are going to learn \u201cHow to integrate the payment method in shopware 6.\u201dI hope you know the directory structure of\u00a0Shopware\u00a06 plugin, if you don\u2019t know, see here-\u00a0https:\/\/docs.shopware.com\/en\/shopware-platform-dev-en\/internals\/directory-structure. There is a two way of integrate the payment methods:-one is Synchronous and second is Asynchronous. Both interface method contains transaction id, order details, <a href=\"https:\/\/webkul.com\/blog\/how-to-integrate-the-payment-method-in-shopware-6\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":284,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-318488","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to integrate the payment method in Shopware 6 - Webkul Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/how-to-integrate-the-payment-method-in-shopware-6\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to integrate the payment method in Shopware 6 - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"In this blog, you are going to learn \u201cHow to integrate the payment method in shopware 6.\u201dI hope you know the directory structure of\u00a0Shopware\u00a06 plugin, if you don\u2019t know, see here-\u00a0https:\/\/docs.shopware.com\/en\/shopware-platform-dev-en\/internals\/directory-structure. There is a two way of integrate the payment methods:-one is Synchronous and second is Asynchronous. Both interface method contains transaction id, order details, [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/how-to-integrate-the-payment-method-in-shopware-6\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-12-31T11:39:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-12-31T11:39:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-og.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Diwakar Rana\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Diwakar Rana\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-integrate-the-payment-method-in-shopware-6\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-integrate-the-payment-method-in-shopware-6\/\"},\"author\":{\"name\":\"Diwakar Rana\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/4b025fe4ecbc5c0378cd13bb70da654f\"},\"headline\":\"How to integrate the payment method in Shopware 6\",\"datePublished\":\"2021-12-31T11:39:12+00:00\",\"dateModified\":\"2021-12-31T11:39:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-integrate-the-payment-method-in-shopware-6\/\"},\"wordCount\":285,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-integrate-the-payment-method-in-shopware-6\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-integrate-the-payment-method-in-shopware-6\/\",\"url\":\"https:\/\/webkul.com\/blog\/how-to-integrate-the-payment-method-in-shopware-6\/\",\"name\":\"How to integrate the payment method in Shopware 6 - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"datePublished\":\"2021-12-31T11:39:12+00:00\",\"dateModified\":\"2021-12-31T11:39:26+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-integrate-the-payment-method-in-shopware-6\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-integrate-the-payment-method-in-shopware-6\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-integrate-the-payment-method-in-shopware-6\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to integrate the payment method in Shopware 6\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/4b025fe4ecbc5c0378cd13bb70da654f\",\"name\":\"Diwakar Rana\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/46482d0264c191ccd0337892016340a80ca4e4987a37f42514a0506aaee7e8dc?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/46482d0264c191ccd0337892016340a80ca4e4987a37f42514a0506aaee7e8dc?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Diwakar Rana\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/diwakar-rana829\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to integrate the payment method in Shopware 6 - Webkul Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/how-to-integrate-the-payment-method-in-shopware-6\/","og_locale":"en_US","og_type":"article","og_title":"How to integrate the payment method in Shopware 6 - Webkul Blog","og_description":"In this blog, you are going to learn \u201cHow to integrate the payment method in shopware 6.\u201dI hope you know the directory structure of\u00a0Shopware\u00a06 plugin, if you don\u2019t know, see here-\u00a0https:\/\/docs.shopware.com\/en\/shopware-platform-dev-en\/internals\/directory-structure. There is a two way of integrate the payment methods:-one is Synchronous and second is Asynchronous. Both interface method contains transaction id, order details, [...]","og_url":"https:\/\/webkul.com\/blog\/how-to-integrate-the-payment-method-in-shopware-6\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2021-12-31T11:39:12+00:00","article_modified_time":"2021-12-31T11:39:26+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-og.png","type":"image\/png"}],"author":"Diwakar Rana","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Diwakar Rana","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/how-to-integrate-the-payment-method-in-shopware-6\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/how-to-integrate-the-payment-method-in-shopware-6\/"},"author":{"name":"Diwakar Rana","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/4b025fe4ecbc5c0378cd13bb70da654f"},"headline":"How to integrate the payment method in Shopware 6","datePublished":"2021-12-31T11:39:12+00:00","dateModified":"2021-12-31T11:39:26+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-integrate-the-payment-method-in-shopware-6\/"},"wordCount":285,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/how-to-integrate-the-payment-method-in-shopware-6\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/how-to-integrate-the-payment-method-in-shopware-6\/","url":"https:\/\/webkul.com\/blog\/how-to-integrate-the-payment-method-in-shopware-6\/","name":"How to integrate the payment method in Shopware 6 - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"datePublished":"2021-12-31T11:39:12+00:00","dateModified":"2021-12-31T11:39:26+00:00","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/how-to-integrate-the-payment-method-in-shopware-6\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/how-to-integrate-the-payment-method-in-shopware-6\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/how-to-integrate-the-payment-method-in-shopware-6\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to integrate the payment method in Shopware 6"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/4b025fe4ecbc5c0378cd13bb70da654f","name":"Diwakar Rana","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/46482d0264c191ccd0337892016340a80ca4e4987a37f42514a0506aaee7e8dc?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/46482d0264c191ccd0337892016340a80ca4e4987a37f42514a0506aaee7e8dc?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Diwakar Rana"},"url":"https:\/\/webkul.com\/blog\/author\/diwakar-rana829\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/318488","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/284"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=318488"}],"version-history":[{"count":3,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/318488\/revisions"}],"predecessor-version":[{"id":318510,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/318488\/revisions\/318510"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=318488"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=318488"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=318488"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}