Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/json/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 为与FormStack的条带集成编写WebHook时出现的问题_Php_Json_Stripe Payments_Formstack - Fatal编程技术网

Php 为与FormStack的条带集成编写WebHook时出现的问题

Php 为与FormStack的条带集成编写WebHook时出现的问题,php,json,stripe-payments,formstack,Php,Json,Stripe Payments,Formstack,我正在努力为FormStack表单上的条带集成编写一个脚本。这就是我从StripeAPI中得到的结果。我有点迷路了 <?php require_once('lib/Stripe.php'); Stripe::setApiKey("sk_test_jioajgiowoiagj"); Stripe_Customer::create(array ( "number" => $cardnumber, "exp_month" => $expmonth, "exp_year" =>

我正在努力为FormStack表单上的条带集成编写一个脚本。这就是我从StripeAPI中得到的结果。我有点迷路了

<?php
require_once('lib/Stripe.php'); 
Stripe::setApiKey("sk_test_jioajgiowoiagj");
Stripe_Customer::create(array
(
"number" => $cardnumber,
"exp_month" => $expmonth,
"exp_year" => $expyear,
"cvc" => $cvc, 
 "name"=> $name,
 "address_line1" => $address1,
 "address_line2"=> $address2,
 "address_city"=> $city,
 "ddress_state"=> $state,
 "address_zip"=> $zip,
 "address_country"=> $county,
));
?>

此处为Stack dev。使用Formstack Webhooks无法实现您希望实现的目标。我们清理了通过Webhook发送的数据,因此Stripe将无法处理信用卡。您可以通过使用高级HTML嵌入代码将表单嵌入到页面中,并用您想要使用的脚本替换表单的submit属性,从而潜在地解决这个问题(首先需要Webhook)

但是,如果您这样做,我们将无法执行任何服务器端验证,您将负责数据的安全性

另外,在示例代码中显示API键是一个非常糟糕的主意