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

StripeQA

目次一覧

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

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

 閲覧数:303 投稿日: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/7/27 17:33 更新
週間人気ページランキング / 7-20 → 7-26
順位 ページタイトル抜粋 アクセス数
1 決済系サービス比較 | 決済(Webサービスビジネス) 3
1 Twitch | ゲーム実況配信サービス(課金販売できるプラットフォーム) 3
2 支払い 2
2 Stripe Q47。Charge::create の 'receipt_email' について | QA(Stripe) 2
2 Stripe webhook 配信の問題 / 実際に受け取った警告メールの受信例 2
2 Stripe Q37。PaymentIntentで支払いを行った後、成功画面を表示させるためにはどうすれば良いですか? | QA(Stripe) 2
3 普通送金とは? / 処理の流れ 1
3 ファンティア | クリエイター支援プラットフォーム(課金販売できるプラットフォーム) 1
3 Stripe Payments > SOURCES / ソース | documentation(Stripe) 1
3 Stripe Q16。PaymentIntentの支払いで郵便番号入力を求められる。Radar rules の ZIP code を無効にしているのに | QA(Stripe) 1
3 PaymentIntentで支払を実装する場合の選択肢 /「Payment Intents API」使用によるカードの支払確認方法は2種類 / PaymentMethodオブジェクトは歴史的経緯により3種類ある 1
3 決済用語 1
3 Stripe Q43。payouts スケジュールについて | QA(Stripe) 1
3 「払い戻し」と「チャージバック」の違い | 違い 1
3 EMVレベル1 / EMVレベル2 / EMVCo とは? 1
3 Stripe Q74.「お客様のビジネスの詳細」とは何ですか? | Stripe 1
3 Stripe Q21。新規顧客作成時に新規ソースオブジェクトを添付したいのですが、No such token: src_xxxxとなります | QA(Stripe) 1
3 Stripe オブジェクト | その他エントリー(Stripe) 1
3 LINE LIVE | ライブ配信サービス(課金販売できるプラットフォーム) 1
3 日本で、Connect Standardアカウント を導入している(と思われる)事例 | その他エントリー(Stripe) 1
2024/7/27 1:02 更新