SSO by SSOToken
Last updated: 13-Oct-2021
Rate this article:
Overview
Use the getCustomerInformationBySSOToken method to retrieve the details of a customer entity from the 2Checkout system. Send the SSO token you create by generating tokenized cart payment links.
Parameters
Parameters | Type/Description |
---|---|
sessionID |
Required (string) |
|
Session identifier, the output of the Login method. Include sessionID into all your requests. 2Checkout throws an exception if the values are incorrect. The sessionID expires in 10 minutes. |
singleSignOnToken |
Required (string) |
The SSO token you create by generating tokenized cart payment links. |
Response
Parameters | Type/Description |
---|---|
Customer |
Object |
Request
<?php
require ('PATH_TO_AUTH');
$idCustomer = '352365983';
$customerType = 'AvangateCustomerReference';
$url = 'https://store.avancart.com/order/checkout.php?PRODS=4639321&QTY=1&CART=1&CARD=2';
$validityTime = 50;
$validationIp = null;
try {
$ssoLINK = $client->getSingleSignOnInCart($sessionID, $idCustomer, $customerType, $url, $validityTime, $validationIp);
}
catch (SoapFault $e) {
echo "ssoLINK: " . $e->getMessage();
exit;
}
var_dump("ssoLINK", $ssoLINK);
parse_str($ssoLINK);
try {
$CustomerSSOInfo = $client->getCustomerInformationBySSOToken($sessionID, $logintoken);
}
catch (SoapFault $e) {
echo "CustomerSSOInfo: " . $e->getMessage();
exit;
}
var_dump("CustomerSSOInfo", $CustomerSSOInfo);
Rate this article: