The following PHP code works fine.
$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?