Plugin Directory

Changeset 3261327


Ignore:
Timestamp:
03/25/2025 09:23:05 AM (12 months ago)
Author:
razorpay
Message:

Update: 1.3.1

Location:
razorpay-quick-payments/trunk
Files:
6 added
14 edited

Legend:

Unmodified
Added
Removed
  • razorpay-quick-payments/trunk/README.txt

    r3138196 r3261327  
    33Tags: razorpay, payments, india, quick, simple
    44Requires at least: 3.0.1
    5 Tested up to: 6.6.1
    6 Stable tag: 1.3.0
     5Tested up to: 6.7
     6Stable tag: 1.3.1
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3737
    3838== Changelog ==
     39
     40= 1.3.1 =
     41* Updated SDK to 2.9.0
    3942
    4043= 1.3.0 =
  • razorpay-quick-payments/trunk/razorpay-php/README.md

    r2916802 r3261327  
    5353```
    5454## Supported Resources
     55- [Account](documents/account.md)
    5556- [Customer](documents/customer.md)
     57- [Dispute](documents/dispute.md)
     58- [Document](documents/document.md)
    5659- [Token](documents/token.md)
    5760- [Order](documents/order.md)
     
    6164- [Fund](documents/fund.md)
    6265- [Invoice](documents/invoice.md)
     66- [Iin](documents/Iin.md)
    6367- [Plan](documents/plan.md)
    6468- [Item](documents/item.md)
     
    6670- [Add-on](documents/addon.md)
    6771- [Payment Links](documents/paymentLink.md)
     72- [Product Configuration](documents/productConfiguration.md)
    6873- [Smart Collect](documents/virtualaccount.md)
     74- [Stakeholder](documents/stakeholder.md)
    6975- [Transfer](documents/transfer.md)
    7076- [QR Code](documents/qrcode.md)
     
    7682- [Register NACH and Charge First Payment Together](documents/registernach.md)
    7783- [Payment Verification](documents/paymentVerfication.md)
     84- [Webhook](documents/webhook.md)
     85
    7886
    7987## Development
  • razorpay-quick-payments/trunk/razorpay-php/libs/Requests-2.0.4/src/Transport/Curl.php

    r2916802 r3261327  
    391391                $url  = self::format_get($url, $data);
    392392                $data = '';
    393             } elseif (!is_string($data)) {
     393            } elseif (!is_string($data) && !isset($data["file"])){
    394394                $data = http_build_query($data, '', '&');
    395395            }
  • razorpay-quick-payments/trunk/razorpay-php/src/Api.php

    r2916802 r3261327  
    55class Api
    66{
    7     protected static $baseUrl = 'https://api.razorpay.com/v1/';
     7    protected static $baseUrl = 'https://api.razorpay.com';
    88
    99    protected static $key = null;
     
    1717    public static $appsDetails = array();
    1818
    19     const VERSION = '2.8.5';
     19    const VERSION = '2.9.0';
    2020
    2121    /**
     
    8585    }
    8686
    87     public static function getFullUrl($relativeUrl)
     87    public static function getFullUrl($relativeUrl, $apiVersion = "v1")
    8888    {
    89         return self::getBaseUrl() . $relativeUrl;
     89        return self::getBaseUrl() . "/". $apiVersion . "/". $relativeUrl;
    9090    }
    9191}
  • razorpay-quick-payments/trunk/razorpay-php/src/Card.php

    r1650276 r3261327  
    1212        return parent::fetch($id);
    1313    }
     14
     15    public function requestCardReference($attributes = array())
     16    {
     17        $entityUrl = $this->getEntityUrl() . '/fingerprints';
     18
     19        return $this->request('POST', $entityUrl, $attributes);
     20    }
    1421}
  • razorpay-quick-payments/trunk/razorpay-php/src/Customer.php

    r2256754 r3261327  
    3838        return $token;
    3939    }
     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    }
    4068}
  • razorpay-quick-payments/trunk/razorpay-php/src/Entity.php

    r2916802 r3261327  
    8383     * @param array  $data
    8484     * @param array  $additionHeader
     85     * @param string $apiVersion
    8586     *
    8687     * @return Entity
    8788     */
    88     protected function request($method, $relativeUrl, $data = null)
     89    protected function request($method, $relativeUrl, $data = null, $apiVersion = "v1")
    8990    {
    9091        $request = new Request();
    9192
    92         $response = $request->request($method, $relativeUrl, $data);
     93        $response = $request->request($method, $relativeUrl, $data, $apiVersion);
    9394
    9495        if ((isset($response['entity'])) and ($response['entity'] == $this->getEntity()))
     
    231232        return $array;
    232233    }
     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    }
    233246}
  • razorpay-quick-payments/trunk/razorpay-php/src/Order.php

    r2916802 r3261327  
    22
    33namespace Razorpay\Api;
     4
     5use Requests;
    46
    57class Order extends Entity
     
    1012    public function create($attributes = array())
    1113    {
     14        $attributes = json_encode($attributes);
     15
     16        Request::addHeader('Content-Type', 'application/json');
     17
    1218        return parent::create($attributes);
    1319    }
     
    4349        return $this->request('GET', $relativeUrl, $options);
    4450    }
     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    }
    4565}
  • razorpay-quick-payments/trunk/razorpay-php/src/Payment.php

    r2916802 r3261327  
    224224        return $this->request('GET', $relativeUrl);
    225225    }
     226
     227    public function expandedDetails($options = array())
     228    {
     229        $relativeUrl = $this->getEntityUrl(). $this->id;
     230
     231        return $this->request('GET', $relativeUrl, $options);
     232    }
    226233}
  • razorpay-quick-payments/trunk/razorpay-php/src/Request.php

    r2916802 r3261327  
    3636     * @param  array $data Data to be passed along the request
    3737     * @param  array $additionHeader headers to be passed along the request
     38     * @param  string $apiVersion version to be passed along the request
    3839     * @return array Response data in array format. Not meant
    3940     * to be used directly
    4041     */
    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);
    4445
    4546        $hooks = new Requests_Hooks();
  • razorpay-quick-payments/trunk/razorpay-php/src/Settlement.php

    r2916802 r3261327  
    6666     * fetch Ondemand Settlement by Id
    6767     * @param  string $id
     68     * @param  array  $options
    6869     * @return array
    6970     */
    70     public function fetchOndemandSettlementById()
     71    public function fetchOndemandSettlementById($id, $options = array())
    7172    {
    72         $relativeUrl = $this->getEntityUrl(). "ondemand/" . $this->id ;
     73        $relativeUrl = $this->getEntityUrl(). "ondemand/" . $id;
    7374       
    74         return $this->request('GET', $relativeUrl);
     75        return $this->request('GET', $relativeUrl, $options);
    7576    }
    7677    /**
     
    7879     * @return array
    7980     */
    80     public function fetchAllOndemandSettlement()
     81    public function fetchAllOndemandSettlement($options = array())
    8182    {
    8283        $relativeUrl = $this->getEntityUrl(). "ondemand/";
    8384       
    84         return $this->request('GET', $relativeUrl);
     85        return $this->request('GET', $relativeUrl, $options);
    8586    }
    8687}
  • razorpay-quick-payments/trunk/razorpay-php/src/Token.php

    r1650276 r3261327  
    44
    55class 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
    715    /**
    816     * @param $id Token id
     
    1321
    1422        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);
    1530    }
    1631
     
    2843        return $this->request('DELETE', $relativeUrl);
    2944    }
     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    }
    3059}
  • razorpay-quick-payments/trunk/razorpay-php/src/Webhook.php

    r2916802 r3261327  
    1111    public function create($attributes = array())
    1212    {
     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        }
    1319        return parent::create($attributes);
    1420    }
     
    1622    public function fetch($id)
    1723    {
     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        }
    1830        return parent::fetch($id);
    1931    }
     
    2133    public function all($options = array())
    2234    {
     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        }
    2341        return parent::all($options);
    2442    }
     
    3452    {
    3553        $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        }
    3761        return $this->request(Requests::PUT, $url, $attributes);
    3862    }
     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    }
    3970}
  • razorpay-quick-payments/trunk/razorpay-quick-payments.php

    r3138196 r3261327  
    55 * Plugin URI: https://github.com/razorpay/razorpay-quick-payments
    66 * Description: Quick Payments for Wordpress, by Razorpay.
    7  * Version: 1.3.0
     7 * Version: 1.3.1
    88 * Author: Team Razorpay
    99 * Author URI: https://razorpay.com/about/
     
    139139            {
    140140                // Random order ID
    141                 $orderID = mt_rand(0, mt_getrandmax());
     141                $orderID = (string)mt_rand(0, mt_getrandmax());
    142142
    143143                // Create a custom field and call it 'amount', and assign the value in paise
Note: See TracChangeset for help on using the changeset viewer.