razorpay-utility
Reactive icon

RazorPay Utility

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 14 February 2023
 by 
5.0
 (5 ratings)
razorpay-utility

RazorPay Utility

Documentation
1.0.0

STEP 1 :

Download the component from forge. After this make sure you go through the documentation of Razorpay and create your own API Key and Secret Key.

Razorpay Link : https://razorpay.com/docs/payments/payment-gateway/get-started.



STEP 2 :

Once you have the API Key and Secret Key save it as client/site variables as per your applications need in Outsystems. Once these keys are available in Outsystems go to manage dependencies and make sure to include the two Server actions of RazorPay Utility in project, the next task is to generate the OrderID.


Step 3 :

To generate OrderID you just need to call the GetOrderId server action of this application. You will also need to pass some parameters to this server action, description for them is given below :

API Key : Same as the one obtained from Razorpay Dashboard.

Secret Key : Same as the one obtained from Razorpay Dashboard.

Amount : The value of money that you want to collect, this parameter takes paisa as input meaning if you want to collect 1 Rupee from user then you will have to send 100 in this parameter.(Basically, just multiply your value by hundred because 1 rupee is 100 paisa.)

Currency : For indian transactions you can defualt this value to “INR”. (Check Razorpay for details)

ReceiptId : For every transaction there might me receipt generated in your application, just pass that parameter. Note : This parameter should be unique and random everytime.


STEP 4 :

This step involves implementing the steps given by razorpay for checkout. Once checkout is complete it’ll give us OrderId, PaymentId and Signature in the callback. The next task is to verify if signature is valid or not.


STEP 5 :

To verify that the signature received from razorpay is not tampered we will use the second server action CheckSignature, this will give the result whether the signature is correct or not. If signature is valid we can mark the payment as successful otherwise the response is tampered and should retry payment.