You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicclassTestController:Controller{privatereadonlyISpPaymentClient_client_;// Business ECC private keyprivatereadonlyPrivateKey="Your ecc private key";// Spare ECC public keyprivatereadonlyServerPublicKey="Server ecc public key";publicTestController(){varoptions=newSpPaymentClientOptions{ApiKey="Your API key",AppId="Your app id",BaseUrl=newUri("https://payment.tryspare.com");};_client=newSpPaymentClient(options);}// GETpublicasyncTask<IActionResult>Index(){// Initialize paymentvarpayment=newSpDomesticPaymentRequest{Amount=10m,Description="Payment description"};// Sign the paymentvarsignature=SpEccSignatureManager.Sign(payment,PrivateKey);// Create paymentvarcreatePayment=await_paymentClient.CreateDomesticPayment(payment,signature);// To verify signature of the created payment if(SpEccSignatureManager.Verify(createPayment.PaymentResponse,createPayment.Signature,ServerPublicKey)){// signature verified}}}