Plugin Directory

Changeset 3260564


Ignore:
Timestamp:
03/24/2025 06:25:06 AM (12 months ago)
Author:
razorpay
Message:

Update: 4.7.1

Location:
woo-razorpay/trunk
Files:
2 added
12 edited

Legend:

Unmodified
Added
Removed
  • woo-razorpay/trunk/razorpay-sdk/libs/Requests-2.0.4/src/Transport/Curl.php

    r2916692 r3260564  
    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            }
  • woo-razorpay/trunk/razorpay-sdk/src/Account.php

    r2965278 r3260564  
    6060        return $webhook;
    6161    }
     62
     63    public function uploadAccountDoc($attributes = array())
     64    {
     65      $attributes = $this->setFile($attributes);
     66
     67      $entityUrl = $this->getEntityUrl() .$this->id .'/documents';
     68     
     69      return $this->request('POST', $entityUrl, $attributes, 'v2');
     70    }
     71
     72    public function fetchAccountDoc()
     73    {
     74        $entityUrl = $this->getEntityUrl() .$this->id .'/documents';
     75
     76        return $this->request('GET', $entityUrl, null, 'v2');
     77    }
    6278}
  • woo-razorpay/trunk/razorpay-sdk/src/Api.php

    r2965278 r3260564  
    1717    public static $appsDetails = array();
    1818
    19     const VERSION = '2.8.7';
     19    const VERSION = '2.9.0';
    2020
    2121    /**
  • woo-razorpay/trunk/razorpay-sdk/src/Customer.php

    r2533596 r3260564  
    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}
  • woo-razorpay/trunk/razorpay-sdk/src/Entity.php

    r2965278 r3260564  
    232232        return $array;
    233233    }
     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    }
    234246}
  • woo-razorpay/trunk/razorpay-sdk/src/Iin.php

    r2965278 r3260564  
    99        return parent::fetch($id);
    1010    }
     11
     12    public function all($options = array())
     13    {
     14        $relativeUrl = $this->getEntityUrl(). 'list';
     15
     16        return $this->request('GET', $relativeUrl, $options);
     17    }
    1118}
  • woo-razorpay/trunk/razorpay-sdk/src/Order.php

    r2965278 r3260564  
    4949        return $this->request('GET', $relativeUrl, $options);
    5050    }
     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    }
    5165}
  • woo-razorpay/trunk/razorpay-sdk/src/Payment.php

    r2916692 r3260564  
    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}
  • woo-razorpay/trunk/razorpay-sdk/src/Settlement.php

    r2632577 r3260564  
    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}
  • woo-razorpay/trunk/razorpay-sdk/src/Stakeholder.php

    r2965278 r3260564  
    3232        return $this->request('PATCH', $entityUrl, $attributes, 'v2');
    3333    }
     34
     35    public function uploadStakeholderDoc($id, $attributes = array())
     36    {
     37      $attributes = $this->setFile($attributes);
     38
     39      $entityUrl = 'accounts/'.$this->account_id .'/'.$this->getEntityUrl().'/'.$id.'/documents';
     40     
     41      return $this->request('POST', $entityUrl, $attributes, 'v2');
     42    }
     43
     44    public function fetchStakeholderDoc($id)
     45    {
     46        $entityUrl = 'accounts/'.$this->account_id .'/'.$this->getEntityUrl().'/'.$id.'/documents';
     47
     48        return $this->request('GET', $entityUrl, null, 'v2');
     49    }
    3450}
  • woo-razorpay/trunk/readme.txt

    r3221997 r3260564  
    44Requires at least: 3.9.2
    55Tested up to: 6.6
    6 Stable tag: 4.7.0
     6Stable tag: 4.7.1
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    6969
    7070== Changelog ==
     71
     72= 4.7.1 =
     73* Updated SDK update to 2.9.0.
     74* Fixed auto update webhook.
    7175
    7276= 4.7.0 =
  • woo-razorpay/trunk/woo-razorpay.php

    r3221997 r3260564  
    44 * Plugin URI: https://razorpay.com
    55 * Description: Razorpay Payment Gateway Integration for WooCommerce.Razorpay Welcome Back Offer: New to Razorpay? Sign up to enjoy FREE payments* of INR 2 lakh till March 31st! Transact before January 10th to grab the offer.
    6  * Version: 4.7.0
    7  * Stable tag: 4.7.0
     6 * Version: 4.7.1
     7 * Stable tag: 4.7.1
    88 * Author: Team Razorpay
    99 * WC tested up to: 9.1.2
     
    910910            {
    911911                $api = $this->getRazorpayApiInstance();
     912                $api->setHeader('Content-Type', 'application/x-www-form-urlencoded');
    912913
    913914                $webhook = $api->request->request($method, $url, $data);
     
    10811082        protected function getRazorpayPaymentParams($order, $orderId)
    10821083        {
    1083             $getWebhookFlag =  get_option('webhook_enable_flag');
    1084             $time = time();
    1085             if (empty($getWebhookFlag) == false)
    1086             {
    1087                 if ($getWebhookFlag + 86400 < time())
    1088                 {
    1089                     $this->autoEnableWebhook();
    1090                 }
    1091             }
    1092             else
    1093             {
    1094                 update_option('webhook_enable_flag', $time);
    1095                 $this->autoEnableWebhook();
    1096             }
    1097 
    10981084            rzpLogInfo("getRazorpayPaymentParams $orderId");
     1085
    10991086            $razorpayOrderId = $this->createOrGetRazorpayOrderId($order, $orderId);
    11001087
     
    12371224        {
    12381225            rzpLogInfo("Called createRazorpayOrderId with params orderId $orderId and sessionKey $sessionKey");
    1239 
    12401226
    12411227            // Calls the helper function to create order data
Note: See TracChangeset for help on using the changeset viewer.