duanhao8540 2019-06-18 10:27
浏览 9
已采纳

如何从条带Api获取和存储最近两个月的余额交易

I am trying to fetch last 2 months transaction lists which has more than 2000 records from stripe API.

I used following code which only fetch 3 days records.

    $balance = $this->stripelib->getBalanceTransaction()->all(
        array(
                'limit'   => 100,
                'created' => array(
                    'gte' => strtotime('-2 month'), 
                    'lte' => strtotime('1 day') 
                )
            )
        );


    foreach ($balance->data as $bl){}
    $this->addStripeRecord($balance->data);

    while ($balance->has_more){

        $balance = $this->stripelib->getBalanceTransaction()->all(
        array(
            "limit" => 100,
            "created" => array(
                "gte" => strtotime('-2 month'),
                'lte' => strtotime('1 day')
                ), 
            "starting_after" => $bl->id)
        );

        foreach ($balance->data as $bl){}

please help me to solve this issue

  • 写回答

1条回答 默认 最新

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥20 misc尽快完成,急! ! !
      • ¥15 protel99.SE提示一下弹窗
      • ¥15 银河麒麟v10 执行.run失败如何解决
      • ¥15 如何用Python打开LA文件
      • ¥15 用mysql做一个高校工资管理系统
      • ¥21 Multisim设计用三端集成稳压器设计稳压电路
      • ¥15 tp6,在iframe里的网址通过获取url参数失败
      • ¥15 打开opendaylight查看拓扑,为什么直接就显示了两个Switch,在mininet配置了一个topo,这两个Switch还在
      • ¥15 无法远程连接pgsql
      • ¥15 建立DLNM模型时显示基础基矩阵不一致