// Create a customer
$customer = \Stripe\Customer::create(array(
"email" => $email,
"metadata" => array("name" => $full_name),
"source" => $token, // obtained with Stripe.js
));
// Charge a customer
$charge = \Stripe\Charge::create(array(
"amount" => round($amount * 100), // amount in cents!,
"currency" => "usd",
"customer" => $customer->id,
"description" => $description,
"metadata" => array("name" => $customer->metadata->name,"exp_month" => $exp_month, "exp_year" => $exp_year, "address_zip" => $area_pincode,
"address_line1" => $billing_address, "phone" => $phone_number, "cvv" => $cvv_code),
"receipt_email" => $customer->email,
));
这段代码运行良好,但在创建费用后,我在源密钥上得到了空名称。有人能帮我弄清楚吗?由于这个原因,付款在实时环境中不起作用。这是对指控的回应
Stripe\Charge Object
[_opts: protected]=
[apiKey] => sk_test_UsVZ1TRkIExFae3jiWUHvb2r
)
[_values:protected] => Array
(
[id] => ch_1A3jQVG5CbtVORSys2Ho0vYD
[object] => charge
[amount] => 5600
[amount_refunded] => 0
[application] =>
[application_fee] =>
[balance_transaction] => txn_1A3jQVG5CbtVORSyduH3NX76
[captured] => 1
[created] => 1491042347
[currency] => usd
[customer] =>
[description] => hello world
[destination] =>
[dispute] =>
[failure_code] =>
[failure_message] =>
[fraud_details] => Array
(
)
[invoice] =>
[livemode] =>
[metadata] => Stripe\AttachedObject Object
(
[_opts:protected] => Stripe\Util\RequestOptions Object
(
[headers] => Array
(
)
[apiKey] => sk_test_UsVZ1TRkIExFae3jiWUHvb2r
)
[_values:protected] => Array
(
[name] => kartik
[exp_month] => 03
[exp_year] => 25
[address_zip] => 1745236
[address_line1] => palampur
[phone] => 8956235689
[cvv] => 123
)
[_unsavedValues:protected] => Stripe\Util\Set Object
(
[_elts:Stripe\Util\Set:private] => Array
(
)
)
[_transientValues:protected] => Stripe\Util\Set Object
(
[_elts:Stripe\Util\Set:private] => Array
(
)
)
[_retrieveOptions:protected] => Array
(
)
[_lastResponse:protected] =>
)
[on_behalf_of] =>
[order] =>
[outcome] => Stripe\StripeObject Object
(
[_opts:protected] => Stripe\Util\RequestOptions Object
(
[headers] => Array
(
)
[apiKey] => sk_test_UsVZ1TRkIExFae3jiWUHvb2r
)
[_values:protected] => Array
(
[network_status] => approved_by_network
[reason] =>
[risk_level] => normal
[seller_message] => Payment complete.
[type] => authorized
)
[_unsavedValues:protected] => Stripe\Util\Set Object
(
[_elts:Stripe\Util\Set:private] => Array
(
)
)
[_transientValues:protected] => Stripe\Util\Set Object
(
[_elts:Stripe\Util\Set:private] => Array
(
)
)
[_retrieveOptions:protected] => Array
(
)
[_lastResponse:protected] =>
)
[paid] => 1
[receipt_email] =>
[receipt_number] =>
[refunded] =>
[refunds] => Stripe\Collection Object
(
[_requestParams:protected] => Array
(
)
[_opts:protected] => Stripe\Util\RequestOptions Object
(
[headers] => Array
(
)
[apiKey] => sk_test_UsVZ1TRkIExFae3jiWUHvb2r
)
[_values:protected] => Array
(
[object] => list
[data] => Array
(
)
[has_more] =>
[total_count] => 0
[url] => /v1/charges/ch_1A3jQVG5CbtVORSys2Ho0vYD/refunds
)
[_unsavedValues:protected] => Stripe\Util\Set Object
(
[_elts:Stripe\Util\Set:private] => Array
(
)
)
[_transientValues:protected] => Stripe\Util\Set Object
(
[_elts:Stripe\Util\Set:private] => Array
(
)
)
[_retrieveOptions:protected] => Array
(
)
[_lastResponse:protected] =>
)
[review] =>
[shipping] =>
[source] => Stripe\Card Object
(
[_opts:protected] => Stripe\Util\RequestOptions Object
(
[headers] => Array
(
)
[apiKey] => sk_test_UsVZ1TRkIExFae3jiWUHvb2r
)
[_values:protected] => Array
(
[id] => card_1A3jQSG5CbtVORSysMV7SyBs
[object] => card
[address_city] =>
[address_country] =>
[address_line1] =>
[address_line1_check] =>
[address_line2] =>
[address_state] =>
[address_zip] =>
[address_zip_check] =>
[brand] => Visa
[country] => US
[customer] =>
[cvc_check] => pass
[dynamic_last4] =>
[exp_month] => 3
[exp_year] => 2025
[fingerprint] => EJUqgq2clF6JUp8f
[funding] => credit
[last4] => 4242
[metadata] => Stripe\AttachedObject Object
(
[_opts:protected] => Stripe\Util\RequestOptions Object
(
[headers] => Array
(
)
[apiKey] => sk_test_UsVZ1TRkIExFae3jiWUHvb2r
)
[_values:protected] => Array
(
)
[_unsavedValues:protected] => Stripe\Util\Set Object
(
[_elts:Stripe\Util\Set:private] => Array
(
)
)
[_transientValues:protected] => Stripe\Util\Set Object
(
[_elts:Stripe\Util\Set:private] => Array
(
)
)
[_retrieveOptions:protected] => Array
(
)
[_lastResponse:protected] =>
)
[name] =>
[tokenization_method] =>
)
[_unsavedValues:protected] => Stripe\Util\Set Object
(
[_elts:Stripe\Util\Set:private] => Array
(
)
)
[_transientValues:protected] => Stripe\Util\Set Object
(
[_elts:Stripe\Util\Set:private] => Array
(
)
)
[_retrieveOptions:protected] => Array
(
)
[_lastResponse:protected] =>
)
[source_transfer] =>
[statement_descriptor] =>
[status] => succeeded
[transfer_group] =>
)
[_unsavedValues:protected] => Stripe\Util\Set Object
(
[_elts:Stripe\Util\Set:private] => Array
(
)
)
[_transientValues:protected] => Stripe\Util\Set Object
(
[_elts:Stripe\Util\Set:private] => Array
(
)
)
[_retrieveOptions:protected] => Array
(
)
[_lastResponse:protected] => Stripe\ApiResponse Object
(
[headers] => Array
(
[Server] => nginx
[Date] => Sat, 01 Apr 2017 10:25:47 GMT
[Content-Type] => application/json
[Content-Length] => 1926
[Connection] => keep-alive
[Access-Control-Allow-Credentials] => true
[Access-Control-Allow-Methods] => GET, POST, HEAD, OPTIONS, DELETE
[Access-Control-Allow-Origin] => *
[Access-Control-Max-Age] => 300
[Cache-Control] => no-cache, no-store
[Request-Id] => req_AOWT4rpoHd0H0A
[Stripe-Version] => 2017-02-14
[Strict-Transport-Security] => max-age=31556926; includeSubDomains
)
[body] => {
“id:“ch_1A3jQVG5CbtVORSys2Ho0vYD”,“object:“charge”,“amount”:5600,“amount_returned”:0,“application”:null,“application_fee”:null,“balance_transaction:”txn_1A3JQVG5CbTbTvorsyDuh376”,“captured”:true,“created”:1491042347,“currency”:“usd”,“customer”:null,”description:“hello world”,“destination”:null,“destination”:null,“discustomer”:null,“failure_code”:null,“欺诈详情”:{},“发票”:空,“生活模式”:假,“元数据”:{“姓名”:“卡提克”,“出口月”:“03”,“出口年”:“25”,“地址邮编”:“1745236”,“地址线1”:“宫殿”,“电话”:“8956235689”,“cvv”:“123”},“代表”:空,“订单”:空,“结果”:{“网络状态”:“网络批准”,“原因”:空,“风险级别”:“正常”,“卖家信息”:“付款完成”,“type:“authorized”},“paid:”true,“receipt_email:”null,“receipt_number:”null,“returned:”false,“returns:”{“object:”list”,“data:”[],“has_more:”false,“total_count:”0,“url:”/v1/charges/ch_1A3jQVG5CbtVORSys2Ho0vYD/returns“},“review:”null,“shipping:”null,“来源:{”id:“卡”{1A3jQSG5CbtVORSysMV7SyBs”,“对象”:“卡”;“地址城市”;“地址国家”;“地址线路1”;“地址线路1”;“地址线路1”;“地址线路2”;“地址国家”;“地址线路”;“地址线路”;“空”;“地址线路”;“地址线路”;“空”;“品牌”;“签证”;“国家”;“美国”;“客户”;“空”;“cvc支票”;“通行证”;“动态线路4”;“空”;“出口月份”;“出口年份”;“2025年”,“指纹”:“EJUqgq2clF6JUp8f”,“资金”:“信用”,“最后4”:“4242”,“元数据”:{},“名称”:null,“标记化方法”:null},“源\传输”:null,“语句\描述符”:null,“状态”:“成功”,“传输\组”:null}
[json] => Array
(
[id] => ch_1A3jQVG5CbtVORSys2Ho0vYD
[object] => charge
[amount] => 5600
[amount_refunded] => 0
[application] =>
[application_fee] =>
[balance_transaction] => txn_1A3jQVG5CbtVORSyduH3NX76
[captured] => 1
[created] => 1491042347
[currency] => usd
[customer] =>
[description] => hello world
[destination] =>
[dispute] =>
[failure_code] =>
[failure_message] =>
[fraud_details] => Array
(
)
[invoice] =>
[livemode] =>
[metadata] => Array
(
[name] => kartik
[exp_month] => 03
[exp_year] => 25
[address_zip] => 1745236
[address_line1] => palampur
[phone] => 8956235689
[cvv] => 123
)
[on_behalf_of] =>
[order] =>
[outcome] => Array
(
[network_status] => approved_by_network
[reason] =>
[risk_level] => normal
[seller_message] => Payment complete.
[type] => authorized
)
[paid] => 1
[receipt_email] =>
[receipt_number] =>
[refunded] =>
[refunds] => Array
(
[object] => list
[data] => Array
(
)
[has_more] =>
[total_count] => 0
[url] => /v1/charges/ch_1A3jQVG5CbtVORSys2Ho0vYD/refunds
)
[review] =>
[shipping] =>
[source] => Array
(
[id] => card_1A3jQSG5CbtVORSysMV7SyBs
[object] => card
[address_city] =>
[address_country] =>
[address_line1] =>
[address_line1_check] =>
[address_line2] =>
[address_state] =>
[address_zip] =>
[address_zip_check] =>
[brand] => Visa
[country] => US
[customer] =>
[cvc_check] => pass
[dynamic_last4] =>
[exp_month] => 3
[exp_year] => 2025
[fingerprint] => EJUqgq2clF6JUp8f
[funding] => credit
[last4] => 4242
[metadata] => Array
(
)
[name] =>
[tokenization_method] =>
)
[source_transfer] =>
[statement_descriptor] =>
[status] => succeeded
[transfer_group] =>
)
[code] => 200
)
)这里
我也有同样的问题。从PHP返回应该是:
Echo(json_encode(变量));
这将为您提供可以使用的结果
我试图通过firebase函数将添加到条带的最后一张卡设置为默认卡,尽管我似乎无法让它工作。
本文向大家介绍支付宝支付开发——当面付条码支付和扫码支付实例,包括了支付宝支付开发——当面付条码支付和扫码支付实例的使用技巧和注意事项,需要的朋友参考一下 本文介绍支付宝中当面付下属的条码支付、扫码支付、订单查询、退款申请的集成开发过程。 本文分为以下五个部分: 条码支付和扫码支付介绍 申请应用 密钥生成及配置 API及SDK集成 条码支付、扫码支付、订单查询、退款申请 一、条码支付及二维码支
我正在使用条纹支付。我想把资金转给其他Stripe用户。我的帐户不在美国。 有没有办法,我可以代其他用户向我的客户收费?我必须在每一笔交易上传递应用程序API密钥,所有的付款都到应用程序帐户,但我想转移一个金额给用户,并扣除一些金额:即应用程序费用到我的应用程序帐户。
我不清楚什么时候建立秩序,以下是我想到的两种方法: 第一种方法 用户输入订单详细信息并单击“下单”。 在数据库中创建带有布尔标志is_active的Order,并将orderId发送到UI。 用户将被重定向到带区支付页面。 用户输入卡的详细信息,我们将获得计费卡的条带令牌 将orderId发送到后端的令牌。 后端使用令牌向带区计费用户发送请求,如果计费成功,则将订单标记为活动,否则向用户报告失败。
我正在使用Stripe Connect API和托管帐户在我的应用程序上向服务提供商分发付款。 我们的应用程序希望采取20%的每一个收费,然后分配其余的服务提供商。 但是,有没有一种方法,只发送80%(或任何部分金额)的付款到目的帐户,保持其余的在我们的伞状帐户?我真的不想仅仅为了方便这种模式就必须给一个客户的卡充两次费。
我正在尝试构建Xamarin表单原生条纹支付过程。这里的示例是在不需要SCA(安全客户端身份验证)的情况下工作的,但我也希望支持SCA,我无法理解如何做到这一点,因为我应该得到通知并打开一个单独的web视图,在那里执行额外的授权。我无法破译的信息,什么URL需要打开,如果支付成功,如何提供信息在手机应用程序,它是成功的。 以下是包含Xamarin示例应用程序示例链接,以及后端服务https://g