Stripe Q34。I could create a Stripe account with the code below, but where can I find the code for this create method?

StripeQA

目次一覧

 状態:回答待  閲覧数:552  投稿日:2019-04-16  更新日:2019-04-16  
質問履歴34 / 質問した後に気が付いたこと

質問履歴34 / 質問した後に気が付いたこと

 閲覧数:283 投稿日:2019-04-16 更新日:2019-04-16 

質問履歴34


I could create a Stripe account with the code below, but where can I find the code for this create method?
・2019/4/16
I could create a Stripe account with the code below, but where can I find the code for this create method?
\Stripe\Stripe::setApiKey("sk_test_xxxx");

$result = \Stripe\Account::create([
 "type" => "custom",
 "country" => "US",
 "email" => "bob@example.com",
]);

Stripe API

I tried to check the code of the Account object's create method, but I did not find it.
・Where is it?
・There is a similarly named createExternalAccount method, but I have not called this method name.
GitHub stripe-php/lib/Account.php
私は下記コードでStripeアカウントを作成できたのですが、しかし、このcreateメソッドのコードはどこで確認できますか?
\Stripe\Stripe::setApiKey("sk_test_xxxx");

$result = \Stripe\Account::create([
 "type" => "custom",
 "country" => "US",
 "email" => "bob@example.com",
]);

Stripe API

Accountオブジェクトのcreateメソッドのコードを確認しようと思って探したのですが、見つかりません。
・どこにあるのですか?
・似た名前のcreateExternalAccountメソッドはありますが、このメソッド名を私は呼び出していません。
GitHub stripe-php/lib/Account.php

I could create a Stripe account with the code below, but where can I find the code for this create method?

質問した後に気が付いたこと


Accountクラスのcreateメソッド呼出
→ Createトレイトのcreateメソッドが実行されている

▼/lib/Account.php
class Account extends ApiResource
{
   const OBJECT_NAME = "account";
   use ApiOperations\All;
   use ApiOperations\Create;
   //中略
}


▼/lib/ApiOperations/Create.php
namespace Stripe\ApiOperations;
/**
* Trait for creatable resources. Adds a `create()` static method to the class.
*
* This trait should only be applied to classes that derive from StripeObject.
*/
trait Create
{
   /**
    * @param array|null $params
    * @param array|string|null $options
    *
    * @return \Stripe\ApiResource The created resource.
    */
   public static function create($params = null, $options = null)
   {
       self::_validateParams($params);
       $url = static::classUrl();
       list($response, $opts) = static::_staticRequest('post', $url, $params, $options);
       $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
       $obj->setLastResponse($response);
       return $obj;
   }
}


Stripeにおけるトレイト使用例


Stripe Q33。CustomerオブジェクトのcreateSourceメソッドのAPIドキュメントについて

Stripe Q35。「Payment Intents API」で、3Dセキュアなどの認証手順を(顧客が)使用しないことは出来ますか?

コメント投稿(ログインが必要)



類似度ページランキング
順位 ページタイトル抜粋
1 Stripe Q34。I could create a Stripe account with the code below, but where can I find the code for this create method? 23
2 Stripe Q24。After attaching the source to the customer object, how do I check from the customer object? 23
3 Stripe Q9。Checkout beta version で、webhookを受け取ると、client_reference_idがNULL 22
4 Stripe Q8。Stripe Checkout public beta version について 22
5 Stripe Q48。「Checkout\Session - server」「Charge」「PaymentIntent」の使い分け方 21
6 Stripe Q43。payouts スケジュールについて 21
7 Purchase Fulfillment 20
8 Stripe Q25。Why is it an error to use “token_xxxx” not associated with a Customer object for payment? 20
9 Stripe Q20。「webhook」と「synchronous」と「Checkout beta version」について 20
10 Q63.No signatures found matching the expected signature for payload について 20
11 Stripe Q26。If you only accept credit card payments, are there any functions that can not be done with src_xxxx but only with tok_xxxx? 20
12 Stripe Q16。PaymentIntentの支払いで郵便番号入力を求められる。Radar rules の ZIP code を無効にしているのに 20
13 Stripe Q38。Difference between “paymentIntent.status === 'succeeded'” and “payment_intent.succeeded event of Webhook” 20
14 Stripe Q33。CustomerオブジェクトのcreateSourceメソッドのAPIドキュメントについて 20
15 Visa Global Security Summits 19
16 Stripe Q10。Checkout の Simple で、「data-zip-code="true"」追加した場合について 19
17 Stripe Q19。「PaymentIntents」と「Sourceオブジェクト」と「Sources API」の関係について 19
18 Stripe Q14。Customerオブジェクトをcreateする際の"source"パラメータについて 19
19 Stripe Q234。Connect カスタムアカウント手数料 19
20 Stripe Payments > COLLECTING PAYMENT DETAILS > Checkout 19
2024/4/19 22:58 更新
週間人気ページランキング / 4-12 → 4-18
順位 ページタイトル抜粋 アクセス数
1 YouTube | 動画サービス(課金販売できるプラットフォーム) 7
2 Saving Payment Methods / 支払い方法を保存する 3
2 支払い 3
2 「払い戻し」と「チャージバック」の違い | 違い 3
2 EMVレベル1 / EMVレベル2 / EMVCo とは? 3
3 Stripeで"No such token: src"と表示されたら、最初にAPIキーを確認する | Stripe エラー(Stripe) 2
3 pixivFANBOX | クリエイター支援プラットフォーム(課金販売できるプラットフォーム) 2
3 プリペイドカード | カード 2
3 EMVCo | クレジットカード仕様(仕様) 2
3 ログイン 2
3 Stripe Q73.CheckoutのSessionオブジェクトをcreateする際、'payment_intent_data'内の'metadata'として渡したデータを、webhookで受け取る件について | QA(Stripe) 2
3 Stripe Q55.Checkout\Session::createする際の、'client_reference_id'パラメータと'payment_intent_data.metadata'パラメータの違いについて | QA(Stripe) 2
4 「Gumroad」は、決済サービス「PayPal」を利用したオンラインコンテンツ販売サービス | デジタルコンテンツ販売可能なサービス(課金販売できるプラットフォーム) 1
4 Stripe Q16。PaymentIntentの支払いで郵便番号入力を求められる。Radar rules の ZIP code を無効にしているのに | QA(Stripe) 1
4 Connect決済に際して「選択できる入金経路の種類」比較一覧表 / 「Direct Charges」と「Destination Charges」比較具体例 /「Direct Charges」処理方法に関する比較一覧表 1
4 LINE LIVE | ライブ配信サービス(課金販売できるプラットフォーム) 1
4 IBAN | 海外送金(送金) 1
4 「支払」と「送金」の違い | 違い 1
4 Stripe Q13。決済成功時に、「請求に紐づけられたメールアドレス」に対して、メール送信したいのですが、 | QA(Stripe) 1
4 Stripe Payments > Quickstart / クイックスタート | documentation(Stripe) 1
2024/4/19 1:01 更新