测试环境未启用付款方式错误

时间:2019-09-15 19:04:29

标签: node.js api stripe-payments mollie

我整天都在尝试使用Mollie进行结帐并开始运行,但还没有完成。我目前有一个在本地调用的API端点,该端点使用@mollie/api-client进行付款。我有:

const { createMollieClient } = require('@mollie/api-client');

const mollieClient = createMollieClient({ apiKey: 'test_Nc6MQhTU8S2bjxxxyjVC56TJSKD' });

router.post(
  "/authentication.register",
  jsonParser,
  asyncMiddleware(async (req, res) => {
    const payment = await mollieClient.payments.create({
      method: 'bancontact',
          amount: {
              value:    '5.00',
              currency: 'EUR'
          },
          description: 'My first API payment',
          redirectUrl: 'http://localhost:3000/',
      })
    console.log('payment: ', payment);
  })
);

但是The payment method is not enabled in your website profile中的此错误,尽管我正在使用测试API密钥,所以afaik我不需要启用此功能吗?...我想重定向到bancontact结帐,以便用户可以填写在他们的信息中,类似this。我想如果通话没有错误会发生这种情况?

我也尝试过Stripe,但是我既不知道如何启动它并为bancontact运行,但是如果有人知道如何这样做,我非常愿意更改提供者。

0 个答案:

没有答案