Changeset 3261327
- Timestamp:
- 03/25/2025 09:23:05 AM (12 months ago)
- Location:
- razorpay-quick-payments/trunk
- Files:
-
- 6 added
- 14 edited
-
README.txt (modified) (2 diffs)
-
razorpay-php/README.md (modified) (4 diffs)
-
razorpay-php/libs/Requests-2.0.4/src/Transport/Curl.php (modified) (1 diff)
-
razorpay-php/src/Account.php (added)
-
razorpay-php/src/Api.php (modified) (3 diffs)
-
razorpay-php/src/Card.php (modified) (1 diff)
-
razorpay-php/src/Customer.php (modified) (1 diff)
-
razorpay-php/src/Dispute.php (added)
-
razorpay-php/src/Document.php (added)
-
razorpay-php/src/Entity.php (modified) (2 diffs)
-
razorpay-php/src/Iin.php (added)
-
razorpay-php/src/Order.php (modified) (3 diffs)
-
razorpay-php/src/Payment.php (modified) (1 diff)
-
razorpay-php/src/Product.php (added)
-
razorpay-php/src/Request.php (modified) (1 diff)
-
razorpay-php/src/Settlement.php (modified) (2 diffs)
-
razorpay-php/src/Stakeholder.php (added)
-
razorpay-php/src/Token.php (modified) (3 diffs)
-
razorpay-php/src/Webhook.php (modified) (4 diffs)
-
razorpay-quick-payments.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
razorpay-quick-payments/trunk/README.txt
r3138196 r3261327 3 3 Tags: razorpay, payments, india, quick, simple 4 4 Requires at least: 3.0.1 5 Tested up to: 6. 6.16 Stable tag: 1.3. 05 Tested up to: 6.7 6 Stable tag: 1.3.1 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 37 37 38 38 == Changelog == 39 40 = 1.3.1 = 41 * Updated SDK to 2.9.0 39 42 40 43 = 1.3.0 = -
razorpay-quick-payments/trunk/razorpay-php/README.md
r2916802 r3261327 53 53 ``` 54 54 ## Supported Resources 55 - [Account](documents/account.md) 55 56 - [Customer](documents/customer.md) 57 - [Dispute](documents/dispute.md) 58 - [Document](documents/document.md) 56 59 - [Token](documents/token.md) 57 60 - [Order](documents/order.md) … … 61 64 - [Fund](documents/fund.md) 62 65 - [Invoice](documents/invoice.md) 66 - [Iin](documents/Iin.md) 63 67 - [Plan](documents/plan.md) 64 68 - [Item](documents/item.md) … … 66 70 - [Add-on](documents/addon.md) 67 71 - [Payment Links](documents/paymentLink.md) 72 - [Product Configuration](documents/productConfiguration.md) 68 73 - [Smart Collect](documents/virtualaccount.md) 74 - [Stakeholder](documents/stakeholder.md) 69 75 - [Transfer](documents/transfer.md) 70 76 - [QR Code](documents/qrcode.md) … … 76 82 - [Register NACH and Charge First Payment Together](documents/registernach.md) 77 83 - [Payment Verification](documents/paymentVerfication.md) 84 - [Webhook](documents/webhook.md) 85 78 86 79 87 ## Development -
razorpay-quick-payments/trunk/razorpay-php/libs/Requests-2.0.4/src/Transport/Curl.php
r2916802 r3261327 391 391 $url = self::format_get($url, $data); 392 392 $data = ''; 393 } elseif (!is_string($data) ){393 } elseif (!is_string($data) && !isset($data["file"])){ 394 394 $data = http_build_query($data, '', '&'); 395 395 } -
razorpay-quick-payments/trunk/razorpay-php/src/Api.php
r2916802 r3261327 5 5 class Api 6 6 { 7 protected static $baseUrl = 'https://api.razorpay.com /v1/';7 protected static $baseUrl = 'https://api.razorpay.com'; 8 8 9 9 protected static $key = null; … … 17 17 public static $appsDetails = array(); 18 18 19 const VERSION = '2. 8.5';19 const VERSION = '2.9.0'; 20 20 21 21 /** … … 85 85 } 86 86 87 public static function getFullUrl($relativeUrl )87 public static function getFullUrl($relativeUrl, $apiVersion = "v1") 88 88 { 89 return self::getBaseUrl() . $relativeUrl;89 return self::getBaseUrl() . "/". $apiVersion . "/". $relativeUrl; 90 90 } 91 91 } -
razorpay-quick-payments/trunk/razorpay-php/src/Card.php
r1650276 r3261327 12 12 return parent::fetch($id); 13 13 } 14 15 public function requestCardReference($attributes = array()) 16 { 17 $entityUrl = $this->getEntityUrl() . '/fingerprints'; 18 19 return $this->request('POST', $entityUrl, $attributes); 20 } 14 21 } -
razorpay-quick-payments/trunk/razorpay-php/src/Customer.php
r2256754 r3261327 38 38 return $token; 39 39 } 40 41 public function addBankAccount($attributes = array()) 42 { 43 $entityUrl = $this->getEntityUrl().$this->id. '/bank_account'; 44 45 return $this->request('POST', $entityUrl, $attributes); 46 } 47 48 public function deleteBankAccount($bank_id) 49 { 50 $entityUrl = $this->getEntityUrl() . $this->id. '/bank_account/'. $bank_id; 51 52 return $this->request('DELETE', $entityUrl); 53 } 54 55 public function requestEligibilityCheck($attributes = array()) 56 { 57 $entityUrl = $this->getEntityUrl(). '/eligibility'; 58 59 return $this->request('POST', $entityUrl, $attributes); 60 } 61 62 public function fetchEligibility($id) 63 { 64 $entityUrl = $this->getEntityUrl(). '/eligibility/'. $id; 65 66 return $this->request('GET', $entityUrl); 67 } 40 68 } -
razorpay-quick-payments/trunk/razorpay-php/src/Entity.php
r2916802 r3261327 83 83 * @param array $data 84 84 * @param array $additionHeader 85 * @param string $apiVersion 85 86 * 86 87 * @return Entity 87 88 */ 88 protected function request($method, $relativeUrl, $data = null )89 protected function request($method, $relativeUrl, $data = null, $apiVersion = "v1") 89 90 { 90 91 $request = new Request(); 91 92 92 $response = $request->request($method, $relativeUrl, $data );93 $response = $request->request($method, $relativeUrl, $data, $apiVersion); 93 94 94 95 if ((isset($response['entity'])) and ($response['entity'] == $this->getEntity())) … … 231 232 return $array; 232 233 } 234 235 public function setFile($attributes) 236 { 237 if(isset($attributes['file'])){ 238 $attributes['file'] = new \CURLFILE( 239 $attributes['file'], 240 mime_content_type($attributes['file']) 241 ); 242 } 243 244 return $attributes; 245 } 233 246 } -
razorpay-quick-payments/trunk/razorpay-php/src/Order.php
r2916802 r3261327 2 2 3 3 namespace Razorpay\Api; 4 5 use Requests; 4 6 5 7 class Order extends Entity … … 10 12 public function create($attributes = array()) 11 13 { 14 $attributes = json_encode($attributes); 15 16 Request::addHeader('Content-Type', 'application/json'); 17 12 18 return parent::create($attributes); 13 19 } … … 43 49 return $this->request('GET', $relativeUrl, $options); 44 50 } 51 52 public function viewRtoReview() 53 { 54 $relativeUrl = $this->getEntityUrl(). $this->id .'/rto_review'; 55 56 return $this->request('POST', $relativeUrl); 57 } 58 59 public function editFulfillment($attributes = array()) 60 { 61 $relativeUrl = $this->getEntityUrl(). $this->id .'/fulfillment'; 62 63 return $this->request('POST', $relativeUrl, $attributes); 64 } 45 65 } -
razorpay-quick-payments/trunk/razorpay-php/src/Payment.php
r2916802 r3261327 224 224 return $this->request('GET', $relativeUrl); 225 225 } 226 227 public function expandedDetails($options = array()) 228 { 229 $relativeUrl = $this->getEntityUrl(). $this->id; 230 231 return $this->request('GET', $relativeUrl, $options); 232 } 226 233 } -
razorpay-quick-payments/trunk/razorpay-php/src/Request.php
r2916802 r3261327 36 36 * @param array $data Data to be passed along the request 37 37 * @param array $additionHeader headers to be passed along the request 38 * @param string $apiVersion version to be passed along the request 38 39 * @return array Response data in array format. Not meant 39 40 * to be used directly 40 41 */ 41 public function request($method, $url, $data = array() )42 { 43 $url = Api::getFullUrl($url );42 public function request($method, $url, $data = array(), $apiVersion = "v1") 43 { 44 $url = Api::getFullUrl($url, $apiVersion); 44 45 45 46 $hooks = new Requests_Hooks(); -
razorpay-quick-payments/trunk/razorpay-php/src/Settlement.php
r2916802 r3261327 66 66 * fetch Ondemand Settlement by Id 67 67 * @param string $id 68 * @param array $options 68 69 * @return array 69 70 */ 70 public function fetchOndemandSettlementById( )71 public function fetchOndemandSettlementById($id, $options = array()) 71 72 { 72 $relativeUrl = $this->getEntityUrl(). "ondemand/" . $ this->id;73 $relativeUrl = $this->getEntityUrl(). "ondemand/" . $id; 73 74 74 return $this->request('GET', $relativeUrl );75 return $this->request('GET', $relativeUrl, $options); 75 76 } 76 77 /** … … 78 79 * @return array 79 80 */ 80 public function fetchAllOndemandSettlement( )81 public function fetchAllOndemandSettlement($options = array()) 81 82 { 82 83 $relativeUrl = $this->getEntityUrl(). "ondemand/"; 83 84 84 return $this->request('GET', $relativeUrl );85 return $this->request('GET', $relativeUrl, $options); 85 86 } 86 87 } -
razorpay-quick-payments/trunk/razorpay-php/src/Token.php
r1650276 r3261327 4 4 5 5 class Token extends Entity 6 { 6 { 7 8 public function create($attributes = array()) 9 { 10 $url = $this->getEntityUrl(); 11 12 return $this->request('POST', $url, $attributes); 13 } 14 7 15 /** 8 16 * @param $id Token id … … 13 21 14 22 return $this->request('GET', $relativeUrl); 23 } 24 25 public function fetchCardPropertiesByToken($attributes = array()) 26 { 27 $relativeUrl = $this->getEntityUrl(). '/fetch'; 28 29 return $this->request('POST', $relativeUrl, $attributes); 15 30 } 16 31 … … 28 43 return $this->request('DELETE', $relativeUrl); 29 44 } 45 46 public function deleteToken($attributes = array()) 47 { 48 $relativeUrl = $this->getEntityUrl(). '/delete'; 49 50 return $this->request('POST', $relativeUrl, $attributes); 51 } 52 53 public function processPaymentOnAlternatePAorPG($attributes = array()) 54 { 55 $relativeUrl = $this->getEntityUrl().'service_provider_tokens/token_transactional_data'; 56 57 return $this->request('POST', $relativeUrl, $attributes); 58 } 30 59 } -
razorpay-quick-payments/trunk/razorpay-php/src/Webhook.php
r2916802 r3261327 11 11 public function create($attributes = array()) 12 12 { 13 if(isset($this->account_id)) 14 { 15 $url = 'accounts/'. $this->account_id . '/' .$this->getEntityUrl(); 16 17 return $this->request('POST', $url, $attributes, 'v2'); 18 } 13 19 return parent::create($attributes); 14 20 } … … 16 22 public function fetch($id) 17 23 { 24 if(isset($this->account_id)) 25 { 26 $url = 'accounts/'. $this->account_id . '/' .$this->getEntityUrl() . $id; 27 28 return $this->request('GET', $url, null, 'v2'); 29 } 18 30 return parent::fetch($id); 19 31 } … … 21 33 public function all($options = array()) 22 34 { 35 if(isset($this->account_id)) 36 { 37 $url = 'accounts/'. $this->account_id . '/' .$this->getEntityUrl(); 38 39 return $this->request('GET', $url, $options, 'v2'); 40 } 23 41 return parent::all($options); 24 42 } … … 34 52 { 35 53 $url = $this->getEntityUrl() . $id; 36 54 55 if(isset($this->account_id)) 56 { 57 $url = 'accounts/'.$this->account_id .'/'. $url; 58 59 return $this->request('PATCH', $url, $attributes, 'v2'); 60 } 37 61 return $this->request(Requests::PUT, $url, $attributes); 38 62 } 63 64 public function delete($id) 65 { 66 $url = 'accounts/'. $this->account_id . '/' .$this->getEntityUrl(). $id; 67 68 return $this->request('DELETE', $url, null, 'v2'); 69 } 39 70 } -
razorpay-quick-payments/trunk/razorpay-quick-payments.php
r3138196 r3261327 5 5 * Plugin URI: https://github.com/razorpay/razorpay-quick-payments 6 6 * Description: Quick Payments for Wordpress, by Razorpay. 7 * Version: 1.3. 07 * Version: 1.3.1 8 8 * Author: Team Razorpay 9 9 * Author URI: https://razorpay.com/about/ … … 139 139 { 140 140 // Random order ID 141 $orderID = mt_rand(0, mt_getrandmax());141 $orderID = (string)mt_rand(0, mt_getrandmax()); 142 142 143 143 // Create a custom field and call it 'amount', and assign the value in paise
Note: See TracChangeset
for help on using the changeset viewer.