- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我们正在尝试使用 Braintree 的 dropin ui 来向客户收取付款。
我们能够接收客户的付款(并到达“成功”页面),现在需要识别哪个客户进行了付款并将其反射(reflect)在我们的数据库中。
自定义字段似乎不适用于 dropin ui 来传递我们的客户端 ID 等。
dropin ui 的“成功”页面上是否有任何变量可以识别在结帐页面中进行购买的用户?
最佳答案
全面披露:我在 Braintree 工作。如果您还有任何疑问,请随时联系support .
访问与交易关联的客户
Braintree_Transaction
$result
内返回的记录对象确实有 customerDetails
属性(property)。因此,可以识别进行交易的客户:
$result->transaction->customerDetails
将新客户与交易关联
您可以create a customer, store their payment method, and create a transaction at once仅使用 Braintree_Transaction::sale()
。只需传入您从客户端收到的付款方式随机数并将 storeInVaultOnSuccess
设置为 true
即可。 (可选)您可以指定客户 ID 和其他 customer parameters 。 (如果您没有指定客户 ID,网关将为您创建一个。)
$result = Braintree_Transaction::sale([
'amount' => '10.00',
'paymentMethodNonce' => nonceFromTheClient,
'customer' => [
'id' => 'a_customer_id'
],
'options' => [
'storeInVaultOnSuccess' => true,
]
]);
将现有客户与交易关联
使用 Drop-in UI 时,您可以在生成 client token 时包含该客户的 ID,以指定哪个回头客进行了交易。 :
The Drop-in UI supports presenting returning customers with their saved payment methods. To generate a token for a customer in your vault provide the customer's ID.1
$clientToken = Braintree_ClientToken::generate([
"customerId" => $aCustomerId
]);
您只能为保管库中已存在的客户指定 ID。
关于javascript - 识别使用 Braintree dropin ui 进行购买的客户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39586081/
我有一个名为 flightbooking 的表。该表由字段组成,包括标有“R”或“C”的状态、已保留和已取消。 我想弄清楚的是允许删除状态为“C”的记录,但如果下一行的状态为“R”,则不应删除。 [编
关闭。这个问题是opinion-based .它目前不接受答案。 想改进这个问题?更新问题,以便 editing this post 可以用事实和引用来回答它. 1年前关闭。 Improve this
研究 PHP/Gearman。我试图了解 Gearman 服务器/进程如何确定什么构成“有效”客户端。 在我看过的文档中,文档显示了许多连接到 Gearman 服务器的客户端。但是,我没有找到任何描述
HBase案例:客户/订单 假设HBase 用于存储客户和订单信息。有两种核心记录类型被摄取:客户记录类型和订单记录类型。 客户记录类型将包含您通常期望的所有内容: 客户编号 客户名称
当运行配方时出现问题并且客户端运行中途挂起时,安装的 Chef 客户端将无法使用。 然后,您可以退出机器、重新启动、清理 Chef pid 文件等,但每次启动 Chef 客户端时都会显示以下消息: C
我正在用Java开发游戏,目前进展顺利。我想尽早实现多人游戏,因此我在此基础上进行构建,而不是在具有大量不同功能的情况下将整个游戏移植到多人游戏中。 我想使其成为客户端/服务器应用程序。 现在,我确定
我正在尝试以编程方式修改 magento 上的现有客户数据,但出现错误,希望有人可以帮助我。 require_once('../app/Mage.php'); ini_set("error_repor
我正在学习 JQuery。我需要创建一个自定义控件。该控件基本上将呈现一些 HTML。有时,我只想获取 HTML。我希望使用以下语法: // Put generated html inside of
我正在尝试以编程方式修改 magento 上的现有客户数据,但出现错误,希望有人可以帮助我。 require_once('../app/Mage.php'); ini_set("error_repor
我想选择表格的一行并插入到另一个现有表格中。(我用的是php和MySql,两张表除了id和timestamp外,其他列都是一样的) 我试着做一个手推车。我希望当有人付款时,从“carret”中选择该客
我想使用 JXTA 实现客户端-服务器架构。服务器部分的配置也将是 3 层。有谁知道开始这个项目的好地方吗? 提前致谢。 最佳答案 JXTA 处理 p2p 连接。这与客户端-服务器方法相反。 据我了解
我需要创建一个 Stripe 客户并为他们订阅一个计划。我查看了 Stripe.js,似乎虽然您可以获得 token ,但除此之外它没有提供任何东西。有可用于节点和 PHP 的库,但为什么不能用于 J
我有一个数据库设计要求,它变得越来越复杂,我需要找出最佳的处理方法。 目前,我有“联系人”,也有“公司”。一个公司可以有多个联系人,但一个联系人只能属于一个公司。这形成了明显的 1:n 关系。但是,联
http://ecc.galengrover.com/programs/facility-rentals/ 在那个页面上,只有那个页面我有一个奇怪的问题。在内容框上方,“所有区域”一词出现在其他文本的
所以,我让这个 CSS 预加载器正常工作。但是,我在将其添加到我的网站时遇到了一些困难。有人可以帮助我理解代码的实现,以允许预加载器成为网站加载前查看的第一个元素。此时预加载器将淡出。预加载器的代码如
考虑以下场景: 有一个 Windows 服务托管一个 WCF 服务。 WCF 服务在客户端和位于不同物理机器上的 AppFabric 服务器之间提供接口(interface)。它检索对象,对其进行计算
当前端的订单历史页面 (*/sales/order/history/) 只显示一条短消息时,这个问题首先被意识到:您没有下订单。 经过一番调试,发现问题出在这个函数上: Mage::getSingle
我的公司是一些项目的定制开发商店,有些较大,有些较小。目前,我们通过电子邮件处理所有客户通信。所以我们通过电子邮件发送设计文档,他们将其标记并发送回去。然后我们推出了他们产品的测试版,他们通过电子邮件
我有一个小部件 View 如下: 公共(public)类 RemoteNumView 扩展了 FrameLayout { 我如何调用 Roboguice 就像在 RoboActivity 中一样?如下
我有一个包含客户编号、客户名称和商品编号的 MySQL 表。它比这稍微复杂一点,但我尝试稍微简化它并删除敏感数据。 当前表 Unique Customer Number | Customer Name
我是一名优秀的程序员,十分优秀!