创建条带摘要报告 [英] Creating a Stripe Summary Report

查看:38
本文介绍了创建条带摘要报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近将付款处理切换到了 Stripe.我现在需要为我们的财务部门创建一个报告,显示指定日期范围内的交易汇总.我已经开始创建一个简单的 PHP 网页(并使用 Stripe PHP 库),它将提供以下摘要:

I've recently switched payment processing to Stripe. I now need to create a report for our finance department that shows a rollup of transactions within a specified date range. I've started to create a simple PHP web page (and using the Stripe PHP library) that will give the following summaries:

  • 交易计数
  • 交易金额
  • 退款次数
  • 退款金额
  • 费用
  • 网络

我在弄清楚如何使用 Stripe 正确查询费用以进行报告时遇到了一些麻烦.

I'm having some trouble figuring out how to properly query charges with Stripe for my reporting purposes.

我知道我可以通过以下方式收回费用:

I know I can retrieve charges with:

$charges = Stripe_Charge::all();

从返回的一组费用中,我可以计算出我在报告中需要的摘要信息.但是,这最多只能退还 100 笔费用,而且我不知道如何在指定日期范围内退还费用.

And from the returned set of charges, I can compute the summary information that I need in the report. However, this will only return me a maximum of 100 charges, and I don't know how to return the charges within a specified date range.

我希望更多有经验的 Stripe 开发人员可以向我指出构建所需报告的正确方法.

I'm hoping more experienced Stripe developers can point me to the correct method of building the report I need.

如何退回指定日期范围内的所有费用?

是否有更好的方法从 Stripe 获取此摘要信息?

推荐答案

我收到了来自 Stripe 员工的确认,实际上只有两个选项是 @dwhalen 和 @Saikat Chakrabarti 的答案中描述的选项.

I received confirmation from a Stripe employee that the only two options are in fact the ones described in the answers from @dwhalen and @Saikat Chakrabarti.

Stripe 员工对 我在 Stripe 上问过的问题:

Quoting from the Stripe employee to the same question I asked on Stripe:

除了您描述的选项(检索所有费用,或在收费时在您的数据库中进行跟踪)没有任何生成您想要的统计数据的替代方法.

Other than the options you described (retrieving all charges, or tracking in your database as charges come in) there isn't any alternative way of producing the stats that you want there.

这篇关于创建条带摘要报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆