2016-07-23 56 views
0

我正在整合條形支付網關。我已經成功整合了它。但問題是我想發送exptra參數爲條紋一次,並獲得響應。 現在我使用如何發送帶狀電荷的額外參數。

   Stripe_Charge::create(array(
        "amount" => number_format($amount,2,".","")*100, 
        "currency" => AccountCurrency, 
        "card" => $_POST['stripeToken'], 
        "description" => "Desc: " . $custom 
       )); 

我想送額外partameter像ORDER_ID,並希望從響應,條紋給客戶ID爲經常性費用。

 Stripe_Charge::create(array(
        "amount" => number_format($amount,2,".","")*100, 
        "currency" => AccountCurrency, 
        "card" => $_POST['stripeToken'], 
        "description" => "Desc: " . $custom, 
        "Order_id => $order // Is there any method to send paramerte like this. 
       )); 

謝謝。

回答

0

您可以使用metadata屬性。見波紋管 -

Stripe_Charge::create(array(
    "amount" => number_format($amount,2,".","")*100, 
    "currency" => AccountCurrency, 
    "card" => $_POST['stripeToken'], 
    "description" => "Desc: " . $custom, 
    "metadata" => array("order_id" => $order) 
)); 

檢查文檔here