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

Updated PHP wrapper #2

Open
wants to merge 140 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
173caeb
Added documentation for easy usage of the API.
rishimukherjee Oct 25, 2013
e8ac4d0
Adding support for Webhook URL
hiway May 27, 2014
2909f23
Removing compulsiory file upload to create an Offer.
hiway May 27, 2014
f7131b1
Merge branch 'develop' into feature/201405-webhook
hiway May 27, 2014
a9662a3
Merge branch 'feature/201405-webhook' into develop
hiway May 27, 2014
3eabdd9
Merge branch 'release/201405-webhook'
hiway May 27, 2014
8c786be
Replacing old API wrapper code with newer, cleaner, concise and easie…
hiway Jul 28, 2014
4842db0
Updating documentation for API 1.1
hiway Jul 28, 2014
e262a65
Rename Instamojo.php to instamojo.php
hiway Jul 28, 2014
481c7fb
Updating documentation for enable_pwyw and enable_sign options added …
hiway Aug 14, 2014
e718c37
Add support for Payment List Pagination with limit and page parameters.
saich Mar 5, 2015
fbbd267
Merge pull request #2 from Instamojo/payment_list_pagination_support
hiway Mar 5, 2015
6539761
Use is_null() to compare against null.
ashwch Mar 16, 2015
f1f0631
Fixed array dereferencing issue for BC.
ashwch Mar 30, 2015
1f98033
Merge pull request #3 from ashwch/master
hiway Mar 30, 2015
7c76f2d
Typo fixed
ashwch Mar 31, 2015
0686094
Merge pull request #4 from ashwch/master
ashwch Apr 10, 2015
255eefd
Fixes issue #5
ashwch Apr 10, 2015
19bbe14
Merge pull request #6 from ashwch/master
ashwch Apr 10, 2015
b6461fa
Now using empty() to prevent the index notice.
ashwch Oct 29, 2015
6043ed4
Raise an exception if there's a cURL error and dedicated message from…
ashwch Oct 29, 2015
df80085
Merge pull request #9 from ashwch/bugfix/fixes-issue#7
saich Oct 29, 2015
3b3fc3a
Merge pull request #10 from ashwch/bugfix/fixes-issue#8
saich Oct 29, 2015
0c8f1bf
Merge pull request #1 from ashwch/bugfix/fixes-issue#7
ashwch Nov 19, 2015
79ae3d1
Merge pull request #2 from ashwch/bugfix/fixes-issue#8
ashwch Nov 19, 2015
bce982c
Added methods related to RAP
ashwch Nov 19, 2015
86bdac9
Updated README with RAP content
ashwch Nov 19, 2015
2198c17
Typos and minor fixes.
ashwch Nov 19, 2015
dcecb69
Merge pull request #11 from ashwch/feature/rap
ashwch Nov 19, 2015
5ca6629
Merge pull request #3 from ashwch/feature/rap
ashwch Nov 19, 2015
53d6de5
Improvements and fixes to README
ashwch Nov 19, 2015
08a4a4f
Moar fixes and clarity.
ashwch Nov 19, 2015
c52ffad
Merge pull request #12 from ashwch/improvements/documentation-fixes
ashwch Nov 19, 2015
44cf705
Merge pull request #4 from ashwch/improvements/documentation-fixes
ashwch Nov 19, 2015
de4a692
Added a generic function to handle file uploading in both PHP < 5.5 a…
ashwch Nov 23, 2015
6e9c51a
Merge pull request #14 from Instamojo/bugfix/issue#13
ashwch Nov 23, 2015
3dbf7f7
Minor fixes
ashwch Nov 23, 2015
d6c073c
Merge pull request #15 from Instamojo/improvements/doc-fixes
ashwch Nov 23, 2015
03a544b
The 'currency' key is not required anymore, wrapper will pass it for …
ashwch Nov 23, 2015
48d4106
Merge pull request #16 from Instamojo/improvement/remove-currency-key
ashwch Nov 23, 2015
373de32
Added Refund endpoints
ashwch Dec 9, 2015
14ce8e5
Updated README to include refunds
ashwch Dec 9, 2015
44d9968
Merge remote-tracking branch 'upstream/master' into feature/refund-en…
ashwch Dec 9, 2015
cc0d9f1
Merge pull request #18 from Instamojo/feature/refund-endpoints
ashwch Dec 9, 2015
b13eb66
Merge remote-tracking branch 'origin/master' into feature/payment_req…
ashwch Jan 13, 2016
b4fff5a
Merge remote-tracking branch 'upstream/master' into feature/payment_r…
ashwch Jan 13, 2016
f72cda0
Added endpoint to get details of a payment related to a payment request
ashwch Jan 13, 2016
503728e
Updated README
ashwch Jan 13, 2016
1babdf0
Split the README into 3 parts
ashwch Jan 13, 2016
bd32164
Merge pull request #19 from ashwch/feature/payment_request_payment_de…
ashwch Jan 14, 2016
0eee308
Added composer support
ChaudhariAmolSopan Feb 15, 2016
c568762
Updated name, email and added link to contributors.
ashwch Mar 21, 2016
a77435d
Merge pull request #22 from Instamojo/composer-support
ashwch Mar 21, 2016
c7bb76f
Updated docs to include the namespace
ashwch Mar 30, 2016
3f3a987
Merge pull request #23 from Instamojo/doc-namespace-fix
ashwch Mar 30, 2016
adfa0a8
Fixed namespace issue with Exception
ashwch Apr 2, 2016
1b1355a
Removed unnecessary spaces
ashwch Apr 2, 2016
de16689
Merge pull request #24 from Instamojo/bugfix/global-namespace-fix
ashwch Apr 2, 2016
73abf9e
Removed the square brackets because they are confusing to most people.
ashwch May 18, 2016
d4e5cb7
Added a note related to third argument of the Instamojo class that sh…
ashwch May 18, 2016
9e9e443
Removed the quotes as well because all-caps constants are much easier…
ashwch May 18, 2016
03751cc
Let's fit this in single line
ashwch May 18, 2016
989a250
Merge pull request #25 from Instamojo/improvement/include-third-argum…
ashwch May 18, 2016
c584139
Added some more details related to sandbox
ashwch May 18, 2016
056abe6
RAP is now the default README and the older README has been moved to …
ashwch May 26, 2016
17e77d9
Merge pull request #26 from Instamojo/feature/make-rap-default-document
ashwch May 26, 2016
f17358d
Updated composer.json to include more properties
ashwch Jul 19, 2016
2dc0989
Merge pull request #27 from Instamojo/update-composer
indradhanush Jul 19, 2016
c52eb72
Added installation instructions related to composer and updated compo…
ashwch Jul 19, 2016
a81be2d
Merge pull request #28 from Instamojo/packagist-support
indradhanush Jul 19, 2016
6a7a2ab
Dropped the stability to 'dev'
ashwch Jul 19, 2016
a90d213
Merge pull request #29 from Instamojo/packagist-support
indradhanush Jul 19, 2016
512d165
Well these properties are roo-only, no need to include them here.
ashwch Jul 19, 2016
80a3dd3
Merge pull request #30 from Instamojo/packagist-support
ashwch Jul 19, 2016
2ec01e7
Switched to psr-4
ashwch Jul 19, 2016
3a584e4
Merge pull request #31 from Instamojo/composer-support
ashwch Jul 19, 2016
0481137
Namespace fix
ashwch Jul 19, 2016
b370fe6
Removed instamojo.php
ashwch Jul 19, 2016
1632a66
Updated package name
ashwch Jul 19, 2016
82bac53
Fixed namespace path
ashwch Jul 19, 2016
050b08c
Better docs
ashwch Jul 19, 2016
d9816f8
Let's be specific about markdown language used
ashwch Jul 19, 2016
9448fa4
Fixed markdown issue
ashwch Jul 19, 2016
9c084d7
Updated links to the docs and another markdown fix
ashwch Jul 19, 2016
c09a92d
Merge pull request #32 from ashwch/master
ashwch Jul 19, 2016
13d4e12
Forgot to change the name here
ashwch Jul 19, 2016
2cdd4c3
Included cacert.pem to the project to handle curl error #60
ashwch Jul 20, 2016
fe6cbec
Updated READMEs
ashwch Jul 20, 2016
c214158
Merge pull request #34 from Instamojo/include-cacert
indradhanush Jul 20, 2016
8607a8c
Added badges
ashwch Aug 2, 2016
cca0ad5
Fixed license link and spacing
ashwch Aug 2, 2016
638a7e0
Added license file
ashwch Aug 2, 2016
900e4d4
Merge pull request #36 from Instamojo/feature/mit-license
ashwch Aug 2, 2016
b959de6
Update the term Link with Product in the README related to links
ashwch Aug 2, 2016
7d1cbe3
Merge pull request #37 from Instamojo/feature/terminology-update
ashwch Aug 4, 2016
f5bc531
Now using the constant DIRECTORY_SEPARATOR instead of hardcoding path…
ashwch Aug 10, 2016
5d0baaa
Merge pull request #38 from Instamojo/fix/os-specific-path-separator
ashwch Aug 10, 2016
4f431b8
Updated file to match ps4 specs. Fixes #35
ashwch Sep 25, 2016
8b5a7f7
Merge pull request #39 from Instamojo/fix/filename
ashwch Sep 25, 2016
44f2191
Add pagination
sarthakk97 Apr 12, 2019
6c14931
Merge PaginatedRefundsList and RefundsList
sarthakk97 Apr 30, 2019
d08c11d
Make small changes
sarthakk97 Apr 30, 2019
bdca3c8
Fix variable check
sarthakk97 Apr 30, 2019
99dc50b
Merge pull request #43 from sarthakk97/master
vijithv May 5, 2019
552e0d4
INIT v2 implementation
deepanshsachdeva Jun 27, 2019
e359b32
ADD lib exceptions
deepanshsachdeva Jun 28, 2019
2d5b8b7
ADD payment details api
deepanshsachdeva Jun 28, 2019
66295f6
ADD method to create refund for payment
deepanshsachdeva Jul 1, 2019
54ba8f3
ADD method for payment request
deepanshsachdeva Jul 1, 2019
360da78
ADD methods for creating & fetching gateway orders
deepanshsachdeva Jul 1, 2019
1d6ccee
ADD methods to get refunds list & details
deepanshsachdeva Jul 2, 2019
7fc9b9f
UPDATE: auth request for refresh token
deepanshsachdeva Jul 3, 2019
eb713c9
ADD: method for gateway orders lists
deepanshsachdeva Jul 3, 2019
9f643a1
delete DS store
vijithv Jul 24, 2019
58fc3de
updating readme: rap pagination options
vijithv Jul 25, 2019
ddc79dc
Merge pull request #44 from Instamojo/readme_update
vijithv Jul 25, 2019
d5169c1
ADDED method related refunds,ADDED user-agent in request header,ADDED…
Aug 20, 2019
4e2ebd5
Merge pull request #45 from Instamojo/master
mojodhanesh Aug 20, 2019
894c340
EDIT readme
Aug 21, 2019
ecfb042
Merge branch 'develop' into dev
nikhilsquareboat Aug 21, 2019
25d2b3e
Merge pull request #46 from squareboat/dev
nikhilsquareboat Aug 21, 2019
c9a9914
Edit config.yml
Aug 21, 2019
fc7c6a5
Edit config.yml
Aug 21, 2019
8177671
Merge pull request #47 from squareboat/dev
nikhilsquareboat Aug 21, 2019
f34ed7f
Showing test cases name while executing with pass fail status And add…
Aug 23, 2019
07c2971
EDIT Readme.md
Aug 23, 2019
b9667f7
ADDED archive of v2.0 documentation in docs/v2.0
Aug 26, 2019
da90de4
ADDED archive of v1.1 documentation in docs/v1.1
Aug 26, 2019
953e25f
ADDED refrence to other version of instamojo-php in readme.md
Aug 26, 2019
be476eb
ADDED refrence to other version of instamojo-php in readme.md
Aug 26, 2019
d38d8c3
ADDED refrence to other version of instamojo-php in readme.md
Aug 26, 2019
e3d5adc
ADDED refrence to other version of instamojo-php in readme.md
Aug 26, 2019
fb138c4
ADDED Final changes to readme.md
Aug 26, 2019
1b90425
Merge pull request #48 from squareboat/dev
mojodhanesh Sep 4, 2019
502e446
CHANGE double qoutes to single qoutes
sb-vinayak Mar 15, 2020
fa11e4e
CHANGE move docs/v2.0/README.MD to root
sb-vinayak Mar 15, 2020
ef6cbde
CHANGE README.MD as per mardown standards
sb-vinayak Mar 15, 2020
82d37f5
REMOVE double qoutes in utilities
sb-vinayak Mar 15, 2020
09a9cd9
CHANGE __construt method definition
sb-vinayak Mar 16, 2020
9a86672
Merge pull request #51 from vinayak25/develop
yashgoenka-im Jun 17, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update the term Link with Product in the README related to links
ashwch committed Aug 2, 2016
commit b959de68c7e01e6008422e3b5e38d9836563d81c
30 changes: 15 additions & 15 deletions OLD_API.md
Original file line number Diff line number Diff line change
@@ -22,13 +22,13 @@ $ php composer.phar require instamojo/instamojo-php
$api = new Instamojo\Instamojo(API_KEY, AUTH_TOKEN);
```

### Create a Link
### Create a product

```php
try {
$response = $api->linkCreate(array(
'title'=>'Hello API',
'description'=>'Create a new Link easily',
'description'=>'Create a new product easily',
'base_price'=>100,
'cover_image'=>'/path/to/photo.jpg'
));
@@ -39,14 +39,14 @@ catch (Exception $e) {
}
```

This will give you JSON object containing details of the Link that was just created.
This will give you JSON object containing details of the product that was just created.

### Edit a Link
### Edit a product

```php
try {
$response = $api->linkEdit(
'hello-api', // You must specify the slug of the Link
'hello-api', // You must specify the slug of the product
array(
'title'=>'A New Title',
));
@@ -57,7 +57,7 @@ catch (Exception $e) {
}
```

### List all Links
### List all products

```php
try {
@@ -97,28 +97,28 @@ catch (Exception $e) {

You have these functions to interact with the API:

* `linksList()` List all Links created by authenticated User.
* `linkDetail($slug)` Get details of Link specified by its unique slug.
* `linkCreate(array $link)` Create a new Link.
* `linkEdit($slug, array $link)` Edit an existing Link.
* `linkDelete($slug)` Archvive a Link - Archived Links cannot be generally accessed by the API. User can still view them on the Dashboard at instamojo.com.
* `linksList()` List all products created by authenticated User.
* `linkDetail($slug)` Get details of product specified by its unique slug.
* `linkCreate(array $link)` Create a new product.
* `linkEdit($slug, array $link)` Edit an existing product.
* `linkDelete($slug)` Archive a product - Archived producrs cannot be generally accessed by the API. User can still view them on the Dashboard at instamojo.com.
* `paymentsList()` List all Payments linked to User's account.
* `paymentDetail($payment_id)` Get details of a Payment specified by its unique Payment ID. You may receive the Payment ID via `paymentsList()` or via URL Redirect function or as a part of Webhook data.

## Link Creation Parameters
## Product Creation Parameters

### Required

* `title` - Title of the Link, be concise.
* `title` - Title of the product, be concise.
* `description` - Describe what your customers will get, you can add terms and conditions and any other relevant information here. Markdown is supported, popular media URLs like Youtube, Flickr are auto-embedded.
* `base_price` - Price of the Link. This may be 0, if you want to offer it for free.
* `base_price` - Price of the product. This may be 0, if you want to offer it for free.

### File and Cover Image
* `file_upload` - Full path to the file you want to sell. This file will be available only after successful payment.
* `cover_image` - Full path to the IMAGE you want to upload as a cover image.

### Quantity
* `quantity` - Set to 0 for unlimited sales. If you set it to say 10, a total of 10 sales will be allowed after which the Link will be made unavailable.
* `quantity` - Set to 0 for unlimited sales. If you set it to say 10, a total of 10 sales will be allowed after which the product will be made unavailable.

### Post Purchase Note
* `note` - A post-purchase note, will only displayed after successful payment. Will also be included in the ticket/ receipt that is sent as attachment to the email sent to buyer. This will not be shown if the payment fails.