duandu5846 2014-09-06 15:13
浏览 21

如何获得使用“条形支付”的付款细节?

I am using stripe for payment using php. I have a system like subscription payment where client are made to be paid every month. After implementing subscription payment i am confused that how will i know the subscribed amount or that re-billed amount is added in my stripe account? Don't stripe has such mechanism to post rebill info in my server after it is deducted from the card? For normal payment i used following code to retrieve payment info, but again its showing error.

<script type="text/javascript" src="jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="https://js.stripe.com/v2/"></script>
<?php 
echo '<script type="text/javascript">Stripe.setPublishableKey("' . STRIPE_PUBLIC_KEY . '");</script>';
require_once('lib/Stripe.php');
Stripe::setApiKey(STRIPE_PRIVATE_KEY);
Stripe_BalanceTransaction::retrieve("card_14ZJGLIv1**********");
?>

And my last question is, in my stripe account i can see 'name' field which is empty but when i add input with 'name' it is showing error. How to set that name field. Stripe provide only following code for payment which doesn't include card holder name:

$charge = Stripe_Charge::create(array(
                "amount" => 5000, // amount in cents
                "currency" => "usd",
                "card" => $token,
                "description" => $desc
                )
            );
  • 写回答

1条回答 默认 最新

  • doujie9882 2014-09-06 15:23
    关注

    Retrieving a customer's subscription

    By default, you can see the 10 most recent active subscriptions stored on a customer directly on the customer object, but you can also retrieve details about a specific active subscription for a customer.

    Arguments

    id: required ID of subscription to retrieve.
    customer: required

    Returns

    Returns the subscription object. [That includes amount]

    Via Stripe Documentation

    $customer = Stripe_Customer::retrieve({CUSTOMER_ID});   
    $subscription = $customer->subscriptions->retrieve({SUBSCRIPTION_ID}));
    
    评论

报告相同问题?

悬赏问题

  • ¥15 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号