条带:返回ACH费用ID

时间:2019-01-06 05:15:18

标签: laravel stripe-payments

我正在研究基于ACH的付款,并成功使用客户ID创建费用。

我正在使用https://github.com/stripe/stripe-php

\Stripe\Stripe::setApiKey("sk_test_sdfw3343r43534");

\Stripe\Charge::create([
  "amount" => 1500,
  "currency" => "usd",
  "customer" => $customer_id // Previously stored, then retrieved
]);

我想集成webhook,以便我可以根据stripe发送的通知异步更新收费状态(无论成功还是失败)。

但是,创建费用时,响应对象($ charge-> id)的ID格式为py _ *********,而不是ch _ ******,如https://stripe.com/docs/api/charges/object?lang=php所述

响应样本:-

Charge {#383 ▼
  +"id": "py_1DpTY8HSSbF1A2EA6KUn5bf3"
  +"object": "charge"
  +"amount": 100000
  +"amount_refunded": 0
  +"application": null
  +"application_fee": null
  +"balance_transaction": "txn_1DpTY8HSSbF1A2EA8nkxH4eX"
  +"captured": true
  +"created": 1546750068
  +"currency": "usd"
  +"customer": "cus_EI3erCTXXXXX"
  +"description": "TEST PAY"
  +"destination": null
  +"dispute": null
  +"failure_code": null
  +"failure_message": null
  +"fraud_details": []
  +"invoice": null
  +"livemode": false
  +"metadata": StripeObject {#406}
  +"on_behalf_of": null
  +"order": null
  +"outcome": StripeObject {#413 ▶}
  +"paid": false
  +"payment_intent": null
  +"receipt_email": "myemail@hotmail.com"
  +"receipt_number": null
  +"refunded": false
  +"refunds": Collection {#417 ▶}
  +"review": null
  +"shipping": null
  +"source": BankAccount {#420 ▶}
  +"source_transfer": null
  +"statement_descriptor": null
  +"status": "pending"
  +"transfer_group": null
}

0 个答案:

没有答案