<?php
class MyClass {
public function getSignature() {
//$message = $this->clientKey . $this->clientSecret . $this->txncurr . $this->amount . $this->username . $this->email_id . $this->mobile_number;
$message = "ryapay_live_RAMeGt4TAVO1E8WaAcyOKQQ026kmKXPiINR100zhangzhang.san@gmail.com1301234123";
// to lowercase hexits
$signature = hash_hmac('sha256', $message, "eDygQawrRCq9UFZS");
return $signature;
}
}
// // 实例化 MyClass 类
$obj = new MyClass();
// // 设置类属性值
// $obj->clientKey = 'your_client_key';
// $obj->clientSecret = 'your_client_secret';
// $obj->txncurr = 'your_txncurr_value';
// $obj->amount = 'your_amount_value';
// $obj->username = 'your_username_value';
// $obj->email_id = 'your_email_id_value';
// $obj->mobile_number = 'your_mobile_number_value';
// $obj->requestHashKey = 'your_request_hash_key';
// 调用 getSignature() 方法
$signature = $obj->getSignature();
// 输出签名
echo 'Signature: ' . $signature;
?>