Set up the Shopware plugin
Install the Pay.com Payments plugin in your Shopware 6 shop, connect it to your Pay.com account, and take a test payment.
Pay.com Payments for Shopware 6 adds Pay.com as a payment method at your shop's checkout. Install it, connect it to your Pay.com account, and take a test payment in the sandbox. What the plugin does once it's running is in Shopware plugin.
Requirements
The plugin works with the Storefront's checkout, and with headless storefronts through the Store API.
| Requirement | Version |
|---|---|
| Shopware | 6.6.10 or later, or 6.7 (tested on 6.7) |
| PHP | 8.2 to 8.5, with the sodium extension |
| Plugin | 0.1.0 |
Install and connect
You connect the plugin with an API key, created in the Pay.com dashboard, for each environment you use.
- 1
Install the plugin
In the administration, go to Extensions → My extensions, click Upload extension, and upload
pay-com-shopware6-payments-0.1.0.zip. Then install and activate Pay.com Payments. The first activation turns on the Pay.com payment method.If you deactivate the plugin later, it switches off its payment methods. Activating it again switches on only the ones it switched off, so a payment method you switched off yourself stays off.
- 2
Add the payment method to your sales channels
In each sales channel that takes Pay.com, add Pay.com to the sales channel's payment methods. The confirm page offers it once the sales channel has a key for the environment it pays in.
- 3
Enter your API keys
Go to Settings → Extensions → Pay.com. On the Sandbox card, click Enter an API key instead, paste an
sk-pay-com-sandbox-key you created in the Pay.com dashboard into API key, and click Check and save the key. Do the same with ansk-pay-com-live-key on the Live card when you take live payments. See Settings.Saving a key also reads the payment methods your Pay.com account offers. Apple Pay, Google Pay, and the account's other methods get Shopware payment methods of their own, in the sales channels that have Pay.com. See Your payment methods.
- 4
Add the webhook
Each environment has its own webhook URL, which its card shows. In the Pay.com dashboard, add a webhook that sends events to that URL, then paste its signing secret into Webhook signing secret on the card and click Save the secret. Do this for each environment you use, and subscribe to the 12 plugin webhook events.
- 5
Keep the message queue and scheduled tasks running
The plugin processes webhooks in Shopware's message queue. In its scheduled tasks, it checks open payments with Pay.com, and once a day it reads your account's payment methods. Make sure the shop runs both, for example with
bin/console messenger:consumeandbin/console scheduled-task:run. - 6
Take a test payment
Sandbox mode is on by default, so the shop takes payments in the sandbox. Place an order with a test card, then turn Sandbox mode off to take live payments.
Next steps
- Apple Pay: Register your shop's domain to show the Apple Pay button.
- Shopware plugin: What the plugin supports, how orders stay in sync with Pay.com, and the data the plugin sends.
- Settings: Every setting with its default.