Deployment
Once the integration has been verified end-to-end in the sandbox (see Testing), follow this checklist to go live.
Production CDN
Swap the script source from the test bundle to the production bundle:
<!-- Sandbox -->
<script src='https://test-pay.dnapayments.com/components/alipay-wechat-pay/alipay-wechat-pay-component.js'></script>
<!-- Production -->
<script src='https://pay.dnapayments.com/components/alipay-wechat-pay/alipay-wechat-pay-component.js'></script>
The bundle determines the default environment, so the environment field in init() can be omitted in production. Pass it explicitly only if you need to override.
Go-live checklist
| # | Step | Where |
|---|---|---|
| 1 | WeChat Pay is enabled on the production terminal (confirm with DNA Payments) | DNA Payments account manager |
| 2 | Backend uses production clientId, clientSecret and terminalId, and requests tokens from https://oauth.dnapayments.com/oauth2/token (instead of the test-oauth URL) | Your backend |
| 3 | <script> tag points at https://pay.dnapayments.com/components/alipay-wechat-pay/alipay-wechat-pay-component.js | Your HTML |
| 4 | Content-Security-Policy allows pay.dnapayments.com | Your CSP headers |
| 5 | paymentTimeoutInSeconds is set to a value that gives your customers enough time to scan and confirm (the default 900 s (15 min) is usually fine) | Your front-end code |
| 6 | Smoke-test a small live transaction end-to-end and reconcile in the portal | Browser + portal |