Testing a BlueSnap API integration

强颜欢笑 提交于 2019-12-25 01:46:30

问题


I'm writing some integration tests for the server part of my BlueSnap integration. I need to find a way to associate a Hosted Payment Fields (HPF) token with credit card details.

In my calls to POST vaulted-shoppers I pass in a HPF token (obtained from payment-fields-tokens). However, this fails with multiple errors such as Field 'Card Number' is required.

The message is misleading: the Card Number is not required. What's actually happening at BlueSnap's end is that the lookup from the HPF token to card details has failed.

In production code, this association between the token and the card details is made from the client using their HPF bluesnap.js. But in the context of a test of server-side code, is there a way to associate the token with some card details?

来源:https://stackoverflow.com/questions/54350044/testing-a-bluesnap-api-integration

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!