出于某种原因,我需要一次获取多个(不是全部)条带价格。我有一个包含 Price_ids 的数组,例如:
$stripe = Cashier::stripe();
$priceIds = [
'price_1Ow....'.,
'price_12lsd...'
];
// do something...
我如何获取这些价格?预先感谢。
这是我尝试过的。但它不能正常工作。
$stripe = Cashier::stripe();
$prices = $stripe->prices->all(
[
'lookup_keys' => $priceIds
]
);
Stripe API 不支持这一点,您只需循环遍历列表并调用
$stripe->prices->retrieve()
每一个即可。