如何设置条纹收费对象billing_details >>电话号码

时间:2019-03-22 10:31:07

标签: stripe-payments

我如何设置收费对象的帐单明细>>电子邮件和帐单明细>>电话

["billing_details"]=>
  object(Stripe\StripeObject)#152 (4) {
      ["address"]=>
      object(Stripe\AttachedObject)#157 (6) {
          ["city"]=>
          string(8) "new city"
          ["country"]=>
          string(2) "US"
          ["line1"]=>
          string(14) "Address Line 1"
          ["line2"]=>
          string(14) "Address Line 2"
          ["postal_code"]=>
          string(5) "11111"
          ["state"]=>
          string(9) "new state"
   }
   **["email"]=>
   NULL**
   ["name"]=>
   string(9) "Test Name"
   **["phone"]=>
   NULL**

}

只有电子邮件和电话设置值得怀疑。创建令牌对象本身时,所有其他设置如下。

$tokenObj = \Stripe\Token::create(array(
        "card" => array(
            "number" =>  $objCreditCard->get('number'),
            "exp_month" => $objCreditCard->get('expiration_month'),
            "exp_year" => $objCreditCard->get('expiration_year'),
            "cvc" => $objCreditCard->get('cvv'),
            "name" => $objCreditCard->get('card_holder_name'),
            "address_line1" => $objBilling->get('address')->get('street_address'),
            "address_line2" => $objBilling->get('address')->get('suite'),
            "address_city" => $objBilling->get('address')->get('city'),
            "address_state" => $objBilling->get('address')->get('region'),
            "address_country" => $objBilling->get('address')->get('country_code'),
            "address_zip" => $objBilling->get('address')->get('postal_code'),
            'metadata' => [
                'phone' => '75756',
                'email' => 'sample@email.com'
            ]
        )
    ));

0 个答案:

没有答案