PayFort Mobile SDK保存卡

时间:2018-02-27 12:07:09

标签: android payment-gateway payfort

我已阅读PayFort支付网关的documentation。我用android SDK安装了项目并完成了交易。事务生成和保存卡正常工作。 成功交易(记住卡)后回复

Success Response: {"amount":"XXXX","response_code":"14000","card_number":"400555******0001","card_holder_name":"Test","payment_option":"VISA","expiry_date":"2105","customer_ip":"xxx.xx.xxx.xx","eci":"ECOMMERCE","language":"en","fort_id":"xxxxxxxxxxxxxxxxxx","command":"PURCHASE","response_message":"Success","sdk_token":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","authorization_code":"xxxxxx","merchant_reference":"xxxxxxxxxxxxx","customer_email":"xxxxx@gmail.com","token_name":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","currency":"SAR","status":"14"}

成功交易(不记得卡)后,回复是

Success Response: {"amount":"XXXX","response_code":"14000","card_number":"400555******0001","card_holder_name":"Test","payment_option":"VISA","expiry_date":"2105","customer_ip":"xxx.xx.xxx.xx","eci":"ECOMMERCE","language":"en","fort_id":"xxxxxxxxxxxxxxxxxx","command":"PURCHASE","response_message":"Success","sdk_token":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","authorization_code":"xxxxxx","merchant_reference":"xxxxxxxxxxxxx","customer_email":"xxxxx@gmail.com","currency":"SAR","status":"14"}

token_name 参数是保存卡响应中的额外响应。现在我的问题是,如果用户保存了他的卡片细节并想稍后使用,那么如何列出那些保存的卡片列表?我无法在列出所有卡片的文档页面中获得任何其他api。如果用户想要直接支付而不使用该令牌输入卡片详细信息,那么还有一件事情,那么所使用的参数是什么以及该交易将使用哪种API?
注意:我可以在我的payfort帐户中查看这些卡片的详细信息。

1 个答案:

答案 0 :(得分:0)

您将无法实际“查看”或获取卡的详细信息列表。对于Payfort而言,这将是不安全的。您只会得到带掩码的卡号“ 400555 ****** 0001”以及令牌名。

您可以执行以下操作:

  1. 在数据库中为特定用户保存这些详细信息。每当您在响应中找到新卡时,您可能必须保存一个新卡条目(当用户将不同卡用于不同交易并保持“记住我”设置时,就会发生这种情况)。
  2. 然后在您的移动用户界面或网络用户界面中,显示带有这些“已屏蔽”卡号的下拉菜单。对于选定的卡,仅在您的付款请求中发送“ token_name”。

最大的好处是您不必保存卡的详细信息,也不必受到攻击。相反,只需保留token_name并在重定向到Payfort时预先填充它即可。