ClassesBigCommerceCheckoutCustomer Login

Customer_Login

Handles customer login logic during the checkout process.

  • Full name: \BigCommerce\Checkout\Customer_Login

Methods

__construct

Constructor for the Customer_Login class.

public __construct(\BigCommerce\Merchant\Onboarding_Api $onboarding, \BigCommerce\Api\Store_Api $store): mixed

Parameters:

ParameterTypeDescription
$onboarding\BigCommerce\Merchant\Onboarding_ApiAPI instance for onboarding.
$store\BigCommerce\Api\Store_ApiAPI instance for store interactions.

set_login_token_for_checkout

Generate a new login token for the customer and update the checkout URL.

public set_login_token_for_checkout(string $checkout_url): string

Depending on whether the store is created through the onboarding process or uses custom API credentials, it generates a login token for the customer.

Parameters:

ParameterTypeDescription
$checkout_urlstringThe original checkout URL.

Return Value:

The updated checkout URL with the login token appended.



Automatically generated on 2025-01-21