php - Stripe 结帐不起作用

标签 php stripe-payments

我们正在使用 stripe payments php 脚本中的方法。我们收到以下错误:

Fatal error: Uncaught exception 'Stripe\Error\InvalidRequest' with message 
    'Amount must be at least 50 cents' in /stripe-php/lib/ApiRequestor.php:102 
     from API request 'req_7w4X4j80cfWZoS'
Stack trace:
#0 /lib/ApiRequestor.php(216): 
       Stripe\ApiRequestor->handleApiError('{\n "error": {\n...', 400, Array, Array)
#1 /stripe-php/lib/ApiRequestor.php(60): 
       Stripe\ApiRequestor->_interpretResponse('{\n "error": {\n...', 400, Array)
#2 /stripe-php/lib/ApiResource.php(105): 
        Stripe\ApiRequestor->request('post', '/v1/charges', Array, Array)
#3 stripe-php/lib/ApiResource.php(137): 
         Stripe\ApiResource::_staticRequest('post', '/v1/charges', Array, NULL)
#4 /home/imarkinfo/donogifts.com/stripe-php/lib/Charge.php(37):
          Stripe\ApiResource::_create(Array, NULL)
#5 /form_section.php(81): 
          Stripe\Charge::create(Array)
#6 {main} thrown in stripe-php/lib/ApiRequestor.php on line 102

请建议我们如何修复它

最佳答案

created the chargeamount=1 .正如错误消息明确指出的那样,minimum amount是 50 美分。 Stripe API 中的所有金额均以美分为单位,因此 amount必须至少为 50创建费用时。

关于php - Stripe 结帐不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35505886/

相关文章:

php - PDO 在 PHP 中与多个数据库连接查询

javascript - 添加访问控制允许来源 : * easily to JSON

php - 我如何在(选择 php、mysql)中的单词之间放置(破折号或下划线)?

ios - Stripe 中没有此类客户错误

stripe-payments - 如何知道 stripe connect 连接的用户登录流程是否已完成或者是否需要更多信息?

javascript - Stripe - 'exp_month' 参数在 Django View 中应该是一个整数(而不是 02 )

cordova - 无法在 Cordova 上加载 Stripe 3ds iframe

javascript - Stripe 测试数据 : single digit month failing validation

php - 使用FOSElastica bundle 一次搜索多种类型

php - 使用 CSS 的 CakePHP 电子邮件