Skip to content

Commit

Permalink
Add order and customer creation code in readme
Browse files Browse the repository at this point in the history
Add order and customer creation code in the readme
  • Loading branch information
Mayur-Wadpalliwar authored and harman28 committed Oct 4, 2019
1 parent 5373f87 commit 624b7fa
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,30 @@ Refund refund = payment.fetchRefund(id);
paymentAmount = payment["amount"];
```

### Create an order
```cs
Dictionary<string, object> options = new Dictionary<string,object>();

options.Add("amount", TransactionAmount);
options.Add("currency", "INR");
options.Add("receipt", "MerchantTransactionId");
options.Add("payment_capture", 1);

Order order = Order.Create(options);
```

### Create a customer
```cs
Dictionary<string, object> options = new Dictionary<string,object>();

options.Add("name", "customer name");
options.Add("contact", "9999999999");
options.Add("email", "[email protected]");
options.Add("fail_existing", 0);

Customer customer = Customer.Create(options);
```

Development
-------
* Open solution in visual studio 2013, it should build fine
Expand Down

0 comments on commit 624b7fa

Please sign in to comment.