public PaymentResponse Pay(PaymentRequest paymentRequest, string apiUrl, string secretKey) { ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; paymentRequest.SetSignature(secretKey); var paymentResponse = RestCall <PaymentResponse>(apiUrl, paymentRequest, secretKey); if (paymentResponse.Success) { paymentResponse.ControlSignature(secretKey, paymentRequest.HashVersion); } return(paymentResponse); }