目次一覧
状態:回答待
閲覧数:591
投稿日:2019-04-28
更新日:2019-04-28
質問履歴39
質問履歴39
質問履歴39
I want to check the processing for the 'success_url' parameter of the 'Checkout \ Session :: create () method' in the Git-Hub code
・2019/4/28
The following PHP code works fine.
The description is also described in the document.
The URL the customer will be directed to after the payment or subscription creation is successful.
But I want to see in PHP code how the process to be redirected to 'success_url' is implemented.
▼stripe-php /lib/Checkout/Session.php
▼stripe-php /lib/ApiOperations/Create.php
Where is the process for 'success_url' implemented?
$checkoutSession = \Stripe\Checkout\Session::create([
'customer_email' => 'customer@example.com',
'success_url' => 'https://xxxx/thanks.php',
The description is also described in the document.
The URL the customer will be directed to after the payment or subscription creation is successful.
But I want to see in PHP code how the process to be redirected to 'success_url' is implemented.
▼stripe-php /lib/Checkout/Session.php
<?php
namespace Stripe\Checkout;
/**
* Class Session
*
* Omission
*
* @property string $success_url
*
* @package Stripe
*/
class Session extends \Stripe\ApiResource
{
const OBJECT_NAME = "checkout.session";
use \Stripe\ApiOperations\Create;
use \Stripe\ApiOperations\Retrieve;
}
▼stripe-php /lib/ApiOperations/Create.php
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;
}
}
Where is the process for 'success_url' implemented?
私は、”Checkout\Session::create()メソッド”の'success_url'パラメータに対する処理をGit-Hubのコードで確認したい
下記PHPコードは正常に動作する。
ドキュメントにも説明が記述されている。
しかし私は'success_url'へリダイレクトされる処理がどのように実装されているかをPHPコードで確認したい。
'success_url'に対する処理はどこで実装されているのですか?
ドキュメントにも説明が記述されている。
しかし私は'success_url'へリダイレクトされる処理がどのように実装されているかをPHPコードで確認したい。
'success_url'に対する処理はどこで実装されているのですか?
・I want to check the processing for the 'success_url' parameter of the 'Checkout \ Session :: create () method' in the Git-Hub code