Answer the question
In order to leave comments, you need to log in
How to sign a request in Masterpass?
Hello everyone, the task is to connect Masterpass. So far, I only have an understanding that I will use the PHP OAuth module.
So far there is this piece:
try {
$oauth = new OAuth('conskey',
'conssec',
OAUTH_SIG_METHOD_RSASHA1);
$oauth->enableDebug();
$requestTokenSigned = $oauth->generateSignature('POST','https://testwallet.masterpass.ru/mpapiv2/GetRequestToken', [
'MerchantName' => 'MercantName',
'Phone' => 'PhoneNumber'
]);
$accessInfo = $oauth->getRequestToken($requestTokenSigned);
if(!empty($accessInfo)) {
print_r($accessInfo);
} else {
print "Failed fetching request token, response was: " . $oauth->getLastResponse();
}
} catch (OAuthException $e) {
print_r($e->getMessage());
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question