php - 使用php创建发票后如何获取条带发票链接
问题描述
我使用条纹发票创建创建了发票 ID:
$invoice = \Stripe\Invoice::create([
"customer" => "customer_id",
]);
但是想要获取以开头的发票 IDinvst_
那么我该如何获取呢?
所以我会用这个链接访问发票
https://pay.stripe.com/invoice/invst_
解决方案
我得到了我自己的答案。使用这些获取发票详细信息:
$invoiceId = $subscription->latest_invoice;
$invoice = \Stripe\Invoice::retrieve($invoiceId);
$invoice_hosted_url = $invoice->hosted_invoice_url;
$invoice_pdf = $invoice->invoice_pdf;
invoice_hosted_url
是发票的主要链接invst_
和完整链接。
推荐阅读
- java - 想要将 SearchView 连接到 Mainactivity 数据 - 制作一个带有搜索视图的记事本应用程序以连接到记事本的笔记
- flutter - 如何检查是否有用户登录应用程序
- javascript - 我怎么能得到数字而不是南?
- javascript - 如何在两个对象数组之间创建每个可能的组合?
- python-3.x - 使用 update_item 动态更新 dynamoDB
- java - Java读取输入/输出打印重复字符串到文件
- python - md5 不适用于 pyspark 中的复杂数据类型
- javascript - Angular 8:从 JSON 服务器获取数据并使用复选框过滤表中的数据
- xml - groovy:修改现有的 xml,总结重复的标签
- javascript - Javascript - 抛出、实例化 new Error() 并在一行中填充其自定义属性