Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java 1.6 #228

Open
wants to merge 45 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
ee237f4
api setup
ankitdas13 Aug 5, 2022
0648098
api setup
ankitdas13 Aug 13, 2022
43cc17e
customer entity and mocktest
ankitdas13 Aug 14, 2022
a8fb17a
mock basetest class
ankitdas13 Aug 14, 2022
1394c5f
fundaccount entity and mock
ankitdas13 Aug 14, 2022
1dcdb71
invoice entity and mock
ankitdas13 Aug 14, 2022
80c79a4
order entity and mock
ankitdas13 Aug 14, 2022
a211807
item entity and mock
ankitdas13 Aug 14, 2022
c85c7ad
card entity and mock
ankitdas13 Aug 14, 2022
b089c98
settlement entity and mock
ankitdas13 Aug 14, 2022
233bfbd
payment entity and mock
ankitdas13 Aug 14, 2022
dc7d397
refund entity and mock
ankitdas13 Aug 14, 2022
1a51078
plan entity and mock
ankitdas13 Aug 14, 2022
9ff0927
subscription entity and mock
ankitdas13 Aug 14, 2022
ba1feef
addon entity and mock
ankitdas13 Aug 14, 2022
7c566b3
virtualaccount entity and mock
ankitdas13 Aug 14, 2022
fa32048
paymentlink entity and mock
ankitdas13 Aug 14, 2022
9e66964
transfer entity and mock
ankitdas13 Aug 14, 2022
8dacb71
registration entity and utils mock
ankitdas13 Aug 14, 2022
5fb4684
removed exception
ankitdas13 Aug 14, 2022
a5679ac
qrcode entity and mock
ankitdas13 Aug 14, 2022
937cb25
added comments & indentation
ankitdas13 Aug 24, 2022
f695661
updated pom and fix security checks
ankitdas13 Aug 24, 2022
57631fa
Merge pull request #245 from razorpay/qrcode_entity_nmock
ankitdas13 Aug 24, 2022
7c23fff
Merge pull request #244 from razorpay/registration_entity_n_utils_mock
ankitdas13 Aug 24, 2022
e73d721
Merge pull request #243 from razorpay/transfer_entity_nmock
ankitdas13 Aug 24, 2022
96be228
Merge pull request #242 from razorpay/paymentlink_entity_nmock
ankitdas13 Aug 24, 2022
b5f4926
Merge pull request #241 from razorpay/virtualaccount_entity_nmock
ankitdas13 Aug 24, 2022
813484f
Merge pull request #240 from razorpay/addon_entity_nmock
ankitdas13 Aug 24, 2022
10596bc
Merge pull request #239 from razorpay/subscription_entity_nmock
ankitdas13 Aug 24, 2022
7d2f437
Merge pull request #238 from razorpay/plan_entity_nmock
ankitdas13 Aug 24, 2022
fbc22fa
Merge pull request #237 from razorpay/refund_entity_nmock
ankitdas13 Aug 24, 2022
1bbc4dc
Merge pull request #236 from razorpay/payment_entity_nmock
ankitdas13 Aug 24, 2022
a503c64
Merge pull request #235 from razorpay/settlement_entity_nmock
ankitdas13 Aug 24, 2022
96315d7
Merge pull request #234 from razorpay/card_entity_nmock
ankitdas13 Aug 24, 2022
e723181
Merge pull request #233 from razorpay/item_entity_nmock
ankitdas13 Aug 24, 2022
99c44bd
Merge pull request #232 from razorpay/order_entity_nmock
ankitdas13 Aug 24, 2022
e2eba4f
Merge pull request #230 from razorpay/fundaccount_entity_nmock
ankitdas13 Aug 24, 2022
8360b02
Merge pull request #229 from razorpay/customer_entity_nmock
ankitdas13 Aug 24, 2022
cb0994d
update readme & added missing paymentLinkTest
ankitdas13 Aug 25, 2022
5aaac47
Merge pull request #231 from razorpay/invoice_entity_nmock
ankitdas13 Aug 25, 2022
9643835
pom update
ankitdas13 Aug 25, 2022
b2f2fb8
Merge branch 'JAVA_1.6' of github.com:razorpay/razorpay-java into JAV…
ankitdas13 Aug 25, 2022
c3a01e7
entity doc updated
ankitdas13 Aug 25, 2022
75b05e8
updated version
ankitdas13 Aug 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 3 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ Documentation of Razorpay's API and their usage is available at <https://docs.ra

## Requirements

Java 1.8 or later

Mock Tests Support till Java 1.8
## Java 1.6

## Installation

Expand All @@ -23,7 +21,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>com.razorpay</groupId>
<artifactId>razorpay-java</artifactId>
<version>1.4.3</version>
<version>1.5.0</version>
</dependency>
```

Expand All @@ -32,7 +30,7 @@ Add this dependency to your project's POM:
Add this dependency to your project's build file:

```groovy
implementation "com.razorpay:razorpay-java:1.4.3"
implementation "com.razorpay:razorpay-java:1.5.0"
```

## Usage
Expand Down Expand Up @@ -95,10 +93,3 @@ razorpayClient.addHeaders(headers);
- [Payment Verification](documents/paymentVerfication.md)
---

* Make custom requests

You can make custom API requests using clients. For example, here is how to make custom request to `/payments/path` endpoint.

```java
Entity response = razorpayClient.Payments.post("path", JSONObject requestBody);
```
2 changes: 1 addition & 1 deletion documents/emandate.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ notes.put("notes_key_1","Tea, Earl Grey, Hot");
notes.put("notes_key_2","Tea, Earl Grey… decaf.");
registrationLinkRequest.put("notes", notes);

Invoice invoice = instance.invoices.createRegistrationLink(registrationLinkRequest);
Invoice invoice = instance.subscriptionRegistrations.create(registrationLinkRequest);
```

**Parameters:**
Expand Down
6 changes: 3 additions & 3 deletions documents/invoice.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ shippingAddress.put("state","Karnataka");
shippingAddress.put("country","in");
customer.put("shipping_address",shippingAddress);
invoiceRequest.put("customer",customer);
List<Object> lines = new ArrayList<>();
List<Object> lines = new ArrayList();
JSONObject lineItems = new JSONObject();
lineItems.put("name","Master Cloud Computing in 30 Days");
lineItems.put("description","Book by Ravena Ravenclaw");
Expand Down Expand Up @@ -71,7 +71,7 @@ JSONObject invoiceRequest = new JSONObject();
invoiceRequest.put("type", "invoice");
invoiceRequest.put("date", "1589994898");
invoiceRequest.put("customer_id","cust_JDdNazagOgg9Ig");
List<Object> lines = new ArrayList<>();
List<Object> lines = new ArrayList();
JSONObject lineItems = new JSONObject();
lineItems.put("item_id","item_J7lZCyxMVeEtYB");
lines.add(lineItems);
Expand Down Expand Up @@ -241,7 +241,7 @@ Invoice invoice = instance.invoices.fetch(invoiceId);
String invoiceId = "inv_DAweOiQ7amIUVd";

JSONObject invoiceRequest = new JSONObject();
List<Object> lines = new ArrayList<>();
List<Object> lines = new ArrayList();
JSONObject lineItems = new JSONObject();
lineItems.put("id","li_JZzL5KfAkHgEaV");
lineItems.put("name","Book / English August - Updated name and quantity");
Expand Down
2 changes: 1 addition & 1 deletion documents/papernach.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ notes.put("notes_key_1","Tea, Earl Grey, Hot");
notes.put("notes_key_2","Tea, Earl Grey… decaf.");
registrationLinkRequest.put("notes", notes);

Invoice invoice = instance.invoices.createRegistrationLink(registrationLinkRequest);
Invoice invoice = instance.subscriptionRegistrations.create(registrationLinkRequest);
```

**Parameters:**
Expand Down
6 changes: 3 additions & 3 deletions documents/paymentLink.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ PaymentLink paymentlink = instance.paymentLink.notifyBy(paymentLinkId,medium);
paymentLinkRequest.put("reminder_enable",true);

JSONObject options = new JSONObject();
List<Object> transfers = new ArrayList<>();
List<Object> transfers = new ArrayList();

JSONObject transferParams = new JSONObject();
transferParams.put("account","acc_I0QRP7PpvaHhpB");
Expand All @@ -232,7 +232,7 @@ PaymentLink paymentlink = instance.paymentLink.notifyBy(paymentLinkId,medium);
notes.put("branch","Acme Corp Bangalore North");
notes.put("name","Bhairav Kumar");
transferParams.put("notes",notes);
List<Object> linkedAccountNotes = new ArrayList<>();
List<Object> linkedAccountNotes = new ArrayList();
linkedAccountNotes.add("branch");
transferParams.put("linked_account_notes",linkedAccountNotes);
transfers.add(transferParams);
Expand Down Expand Up @@ -313,7 +313,7 @@ notify.put("email",true);
paymentLinkRequest.put("notify",notify);
paymentLinkRequest.put("reminder_enable",false);
JSONObject options = new JSONObject();
List<Object> offerParams = new ArrayList<>();
List<Object> offerParams = new ArrayList();
offerParams.add("offer_JTUADI4ZWBGWur");
offerParams.add("offer_F4WJHqvGzw8dWF");
JSONObject order = new JSONObject();
Expand Down
2 changes: 1 addition & 1 deletion documents/registerNach.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ notes.put("notes_key_1","Tea, Earl Grey, Hot");
notes.put("notes_key_2","Tea, Earl Grey… decaf.");
registrationLinkRequest.put("notes", notes);

Invoice invoice = instance.invoices.createRegistrationLink(registrationLinkRequest);
Invoice invoice = instance.subscriptionRegistrations.create(registrationLinkRequest);
```

**Parameters:**
Expand Down
4 changes: 2 additions & 2 deletions documents/subscription.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ subscriptionRequest.put("quantity", 1);
subscriptionRequest.put("customer_notify", 1);
subscriptionRequest.put("start_at", 1580453311);
subscriptionRequest.put("expire_by", 1580626111);
List<Object> addons = new ArrayList<>();
List<Object> addons = new ArrayList();
JSONObject linesItem = new JSONObject();
JSONObject item = new JSONObject();
item.put("name","Delivery charges");
Expand Down Expand Up @@ -86,7 +86,7 @@ subscriptionRequest.put("quantity", 1);
subscriptionRequest.put("customer_notify", 1);
subscriptionRequest.put("start_at", 1580453311);
subscriptionRequest.put("expire_by", 1580626111);
List<Object> addons = new ArrayList<>();
List<Object> addons = new ArrayList();
JSONObject linesItem = new JSONObject();
JSONObject item = new JSONObject();
item.put("name","Delivery charges");
Expand Down
10 changes: 5 additions & 5 deletions documents/transfer.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
String paymentId = "pay_E8JR8E0XyjUSZd";

JSONObject transferRequest = new JSONObject();
List<Object> transfers = new ArrayList<>();
List<Object> transfers = new ArrayList();
JSONObject transferParams = new JSONObject();
transferParams.put("account","acc_I0QRP7PpvaHhpB");
transferParams.put("amount",100);
Expand All @@ -15,7 +15,7 @@ JSONObject notes = new JSONObject();
notes.put("name","Gaurav Kumar");
notes.put("roll_no","IEC2011025");
transferParams.put("notes",notes);
List<Object> linkedAccountNotes = new ArrayList<>();
List<Object> linkedAccountNotes = new ArrayList();
linkedAccountNotes.add("roll_no");
transferParams.put("linked_account_notes",linkedAccountNotes);
transferParams.put("on_hold",true);
Expand Down Expand Up @@ -71,7 +71,7 @@ JSONObject orderRequest = new JSONObject();
orderRequest.put("amount",50000);
orderRequest.put("currency","INR");
orderRequest.put("receipt", "receipt#1");
List<Object> transfers = new ArrayList<>();
List<Object> transfers = new ArrayList();
JSONObject transferParams = new JSONObject();
transferParams.put("account","acc_I0QRP7PpvaHhpB");
transferParams.put("amount",100);
Expand All @@ -80,7 +80,7 @@ JSONObject notes = new JSONObject();
notes.put("name","Gaurav Kumar");
notes.put("roll_no","IEC2011025");
transferParams.put("notes",notes);
List<Object> linkedAccountNotes = new ArrayList<>();
List<Object> linkedAccountNotes = new ArrayList();
linkedAccountNotes.add("roll_no");
transferParams.put("linked_account_notes",linkedAccountNotes);
transferParams.put("on_hold",true);
Expand Down Expand Up @@ -601,7 +601,7 @@ Reversal reversal = instance.transfers.reversal(transferId,transferRequest);
String paymentId = "pay_EB1R2s8D4vOAKG";

JSONObject transferRequest = new JSONObject();
List<Object> transfers = new ArrayList<>();
List<Object> transfers = new ArrayList();
JSONObject transferParams = new JSONObject();
transferParams.put("account","acc_I0QRP7PpvaHhpB");
transferParams.put("amount",100);
Expand Down
10 changes: 5 additions & 5 deletions documents/virtualAccount.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
### Create a virtual account
```java
JSONObject virtualRequest = new JSONObject();
List<Object> types = new ArrayList<>();
List<Object> types = new ArrayList();
JSONObject typesParam = new JSONObject();
types.add("bank_account");
typesParam.put("types",types);
Expand Down Expand Up @@ -66,12 +66,12 @@ VirtualAccount virtualaccount = instance.virtualAccounts.create(virtualRequest);
```java

JSONObject virtualRequest = new JSONObject();
List<Object> types = new ArrayList<>();
List<Object> types = new ArrayList();
JSONObject typesParam = new JSONObject();
types.add("bank_account");
typesParam.put("types",types);
virtualRequest.put("receivers",typesParam);
List<Object> allowedPayer = new ArrayList<>();
List<Object> allowedPayer = new ArrayList();
JSONObject allowedPayerParams = new JSONObject();
allowedPayerParams.put("type","bank_account");
JSONObject bankAccount = new JSONObject();
Expand Down Expand Up @@ -156,7 +156,7 @@ VirtualAccount virtualaccount = instance.virtualAccounts.create(virtualRequest);

```java
JSONObject virtualRequest = new JSONObject();
List<Object> types = new ArrayList<>();
List<Object> types = new ArrayList();
JSONObject typesParam = new JSONObject();
types.add("qr_code");
typesParam.put("types",types);
Expand Down Expand Up @@ -460,7 +460,7 @@ Refund refund = instance.payments.refund(paymentId,refundRequest);
String virtualId = "va_Di5gbNptcWV8fQ";

JSONObject virtualRequest = new JSONObject();
List<Object> types = new ArrayList<>();
List<Object> types = new ArrayList();
types.add("vpa");
virtualRequest.put("types",types);
JSONObject vpa = new JSONObject();
Expand Down