0.1.0 • Published 5 years ago

razor-pay-react-sdk-prodio v0.1.0

Weekly downloads
27
License
ISC
Repository
github
Last release
5 years ago

razor-pay-react-sdk-prodio

razor-pay-react-sdk-prodio provides a quick and secure way of accepting payments using razor pay Checkout library.

Installation

npm install razor-pay-react-sdk-prodio --save

Example

import RazorPay from  'razor-pay-react-sdk-prodio';

  onClose = () => {
   this.setState({openCheckoutForm:false});  
  }

  onPaymentResponse = () =>{
    this.setState({openCheckoutForm:false});
   //payment response after payment is successful.
}
  
  const payload = {
                payment_amount:"",
                order_id:"",
                subscription_id:""//when recurring plan
                description:"",
                keyId:"",
                name:"",
               payerName:"",
               "email":""
              };
	<RazorPay 
		 openCheckoutForm={true}
		 payload={payload}
		 onClose={()=>this.onClose()} 
		 onPaymentResponse={(response)=>this.onPaymentResponse(response)} 
	/>

Payload

KeyTypeDescriptionRequired
order_idstringorder created on your serverYES
keyIdstringkey id of razor pay accountYES
namestringname will be shown on checkout form.YES
payment_amountintegerThe transaction amount to be paid.YES
payment_capturebooleanPayment capture flag to automatically capture the payment.YES

Methods

EventDescription
onCloseevent called on click of close icon in checkout modal
onPaymentResponseevent called on payment captured from razor pay
0.1.0

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago