繁体   English   中英

如何使用 salesforce 中的 Apex 在 Square 中创建客户卡?

[英]How to create customer card in Square using Apex in salesforce?

我们需要使用 salesforce 创建客户并将他们的信用卡信息保存在 Square 中,我们必须稍后通过 apex 代码(在 salesforce 中)向客户收取费用。 因此,为此,我们作为开发人员阅读并理解 Square API 文档。 阅读此链接https://developer.squareup.com/reference/square/customers-api/create-customer后,我们能够使用 Square ZDB974238714CA8DE634A7CE1D03 从 salesforce 创建客户到正方形。 Square API 文档已准备就绪,易于阅读。 但是当我们开始实现为客户 Square 保存信用卡的功能时,我们陷入了困境,因为在 Square 中创建/保存客户卡时,需要“customer_id”和“card_nonce”两件事。 所以我们有客户 ID,因为我们已经在 Square 中使用 salesforce 中的顶点代码创建了客户。 但是我们没有“nonce” Square nonce 代表什么? 根据 Square API 文档生成 nonce 的唯一方法是“Square Payment Form” https://developer.squareup.com/docs/payment-form/payment-form-walkthrough如何使用 Square ZDB97AZCED0148ADE1442387 获取卡的 Nonce从后端所以我花了更多的时间来寻找解决方法,但所有的努力都出错了。 我还尝试创建 VF 页面并将我们在 salesforce object 中已经拥有的所有客户和卡信息从 apex 代码传递到该 Square 支付表单,但 JS 没有执行,Square 支付表单仅适用于 JS ZF20E3C5E54C0AB3D9FA7AZ5D6。

有谁知道我们如何从支持(顶点代码)生成“nonce”来为 Square 中的客户保存卡片?

如果不使用 Square Payment Form,就无法创建 nonce。 您也不能将原始数据传递给 Square Payment Form,因为它不包含填写卡数据(邮政编码除外)的功能。 有人需要使用托管 Square Payment Form 的 HTTPS 手动将该信息输入到站点中,以生成合法的

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM