Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
shahriar-shojib committed May 11, 2021
1 parent ce94f74 commit 7677d13
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,25 @@ React component for accepting bkash payments! [painlessly]
```jsx
import BkashButton from 'react-bkash';

function myCallBack(success, paymentData) { //success true or false
if(success){
function myCallBack(success, paymentData) {
//success true or false
if (success) {
/*
* do something with `paymentData`
*/
* do something with `paymentData`
*/
} else {
alert('payment failed');
}
window.location.reload();
}
<BkashButton
btnText="Pay With Bkash"
amount ="100.20"
createPaymentURL: "https://your-payment-backend-url/createPayment"
executePaymentURL: "http://your-payment-backend-url/executePayment"
amount="100.20"
createPaymentURL="https://your-payment-backend-url/createPayment"
executePaymentURL="http://your-payment-backend-url/executePayment"
callBack={myCallBack}
additionalHeaders={{Authorization: 'Bearer yourServerTokenMaybe?'}}
/>
additionalHeaders={{ Authorization: 'Bearer yourServerTokenMaybe?' }}
/>;
```

- Profit
Expand Down

0 comments on commit 7677d13

Please sign in to comment.