Changeset 1517034
- Timestamp:
- 10/17/2016 11:39:39 PM (9 years ago)
- Location:
- gravity-forms-stripe/trunk
- Files:
-
- 11 edited
-
gravity-forms-stripe.php (modified) (3 diffs)
-
includes/api/stripe-php/init.php (modified) (2 diffs)
-
includes/api/stripe-php/lib/ApiRequestor.php (modified) (2 diffs)
-
includes/api/stripe-php/lib/ApiResource.php (modified) (1 diff)
-
includes/api/stripe-php/lib/Balance.php (modified) (1 diff)
-
includes/api/stripe-php/lib/Collection.php (modified) (1 diff)
-
includes/api/stripe-php/lib/HttpClient/CurlClient.php (modified) (2 diffs)
-
includes/api/stripe-php/lib/Stripe.php (modified) (2 diffs)
-
includes/api/stripe-php/lib/Util/Util.php (modified) (3 diffs)
-
includes/class-gfp-stripe.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
gravity-forms-stripe/trunk/gravity-forms-stripe.php
r1504158 r1517034 5 5 * Plugin URI: https://gravityplus.pro/gravity-forms-stripe 6 6 * Description: Use Stripe to process credit card payments on your site, easily and securely, with Gravity Forms 7 * Version: 1.9.2. 87 * Version: 1.9.2.9 8 8 * Author: gravity+ 9 9 * Author URI: https://gravityplus.pro … … 28 28 * 29 29 * @package GFP_Stripe 30 * @version 1.9.2. 830 * @version 1.9.2.9 31 31 * @author gravity+ <support@gravityplus.pro> 32 32 * @license GPL-2.0+ … … 34 34 * @copyright 2012-2016 gravity+ 35 35 * 36 * last updated: September 4, 201636 * last updated: October 17, 2016 37 37 */ 38 38 -
gravity-forms-stripe/trunk/includes/api/stripe-php/init.php
r1504158 r1517034 36 36 require(dirname(__FILE__) . '/lib/Account.php'); 37 37 require(dirname(__FILE__) . '/lib/AlipayAccount.php'); 38 require(dirname(__FILE__) . '/lib/ApplePayDomain.php'); 38 39 require(dirname(__FILE__) . '/lib/ApplicationFee.php'); 39 40 require(dirname(__FILE__) . '/lib/ApplicationFeeRefund.php'); … … 63 64 require(dirname(__FILE__) . '/lib/Source.php'); 64 65 require(dirname(__FILE__) . '/lib/Subscription.php'); 66 require(dirname(__FILE__) . '/lib/SubscriptionItem.php'); 65 67 require(dirname(__FILE__) . '/lib/ThreeDSecure.php'); 66 68 require(dirname(__FILE__) . '/lib/Token.php'); -
gravity-forms-stripe/trunk/includes/api/stripe-php/lib/ApiRequestor.php
r1504158 r1517034 118 118 } 119 119 120 private static function _formatAppInfo($appInfo) 121 { 122 if ($appInfo !== null) { 123 $string = $appInfo['name']; 124 if ($appInfo['version'] !== null) { 125 $string .= '/' . $appInfo['version']; 126 } 127 if ($appInfo['url'] !== null) { 128 $string .= ' (' . $appInfo['url'] . ')'; 129 } 130 return $string; 131 } else { 132 return null; 133 } 134 } 135 136 private static function _defaultHeaders($apiKey) 137 { 138 $appInfo = Stripe::getAppInfo(); 139 140 $uaString = 'Stripe/v1 PhpBindings/' . Stripe::VERSION; 141 142 $langVersion = phpversion(); 143 $uname = php_uname(); 144 $curlVersion = curl_version(); 145 $appInfo = Stripe::getAppInfo(); 146 $ua = array( 147 'bindings_version' => Stripe::VERSION, 148 'lang' => 'php', 149 'lang_version' => $langVersion, 150 'publisher' => 'stripe', 151 'uname' => $uname, 152 'httplib' => 'curl ' . $curlVersion['version'], 153 'ssllib' => $curlVersion['ssl_version'], 154 ); 155 if ($appInfo !== null) { 156 $uaString .= ' ' . self::_formatAppInfo($appInfo); 157 $ua['application'] = $appInfo; 158 } 159 160 $defaultHeaders = array( 161 'X-Stripe-Client-User-Agent' => json_encode($ua), 162 'User-Agent' => $uaString, 163 'Authorization' => 'Bearer ' . $apiKey, 164 ); 165 return $defaultHeaders; 166 } 167 120 168 private function _requestRaw($method, $url, $params, $headers) 121 169 { … … 135 183 $absUrl = $this->_apiBase.$url; 136 184 $params = self::_encodeObjects($params); 137 $langVersion = phpversion(); 138 $uname = php_uname(); 139 $ua = array( 140 'bindings_version' => Stripe::VERSION, 141 'lang' => 'php', 142 'lang_version' => $langVersion, 143 'publisher' => 'stripe', 144 'uname' => $uname, 145 ); 146 $defaultHeaders = array( 147 'X-Stripe-Client-User-Agent' => json_encode($ua), 148 'User-Agent' => 'Stripe/v1 PhpBindings/' . Stripe::VERSION, 149 'Authorization' => 'Bearer ' . $myApiKey, 150 ); 185 $defaultHeaders = $this->_defaultHeaders($myApiKey); 151 186 if (Stripe::$apiVersion) { 152 187 $defaultHeaders['Stripe-Version'] = Stripe::$apiVersion; -
gravity-forms-stripe/trunk/includes/api/stripe-php/lib/ApiResource.php
r1504158 r1517034 142 142 list($response, $opts) = static::_staticRequest('get', $url, $params, $options); 143 143 $obj = Util\Util::convertToStripeObject($response->json, $opts); 144 if (!is_a($obj, ' Stripe\\Collection')) { //TODO does this need to be namespaced?144 if (!is_a($obj, 'PPP\\Stripe\\Collection')) { 145 145 $class = get_class($obj); 146 146 $message = "Expected type \"PPP\\Stripe\\Collection\", got \"$class\" instead"; -
gravity-forms-stripe/trunk/includes/api/stripe-php/lib/Balance.php
r1504158 r1517034 6 6 * Class Balance 7 7 * 8 * @p aramstring $object9 * @p arammixed $available10 * @p arambool $livedmode11 * @p arammixed $pending8 * @property string $object 9 * @property mixed $available 10 * @property bool $livedmode 11 * @property mixed $pending 12 12 * 13 13 * @package Stripe -
gravity-forms-stripe/trunk/includes/api/stripe-php/lib/Collection.php
r1504158 r1517034 6 6 * Class Collection 7 7 * 8 * @p aramstring $object9 * @p aramstring $url10 * @p arambool $has_more11 * @p arammixed $data8 * @property string $object 9 * @property string $url 10 * @property bool $has_more 11 * @property mixed $data 12 12 * 13 13 * @package Stripe -
gravity-forms-stripe/trunk/includes/api/stripe-php/lib/HttpClient/CurlClient.php
r1504158 r1517034 6 6 use PPP\Stripe\Error; 7 7 use PPP\Stripe\Util; 8 9 // cURL constants are not defined in PHP < 5.5 10 11 // @codingStandardsIgnoreStart 12 // PSR2 requires all constants be upper case. Sadly, the CURL_SSLVERSION 13 // constants do not abide by those rules. 14 15 // Note the values 1 and 6 come from their position in the enum that 16 // defines them in cURL's source code. 17 if (!defined('CURL_SSLVERSION_TLSv1')) { 18 define('CURL_SSLVERSION_TLSv1', 1); 19 } 20 if (!defined('CURL_SSLVERSION_TLSv1_2')) { 21 define('CURL_SSLVERSION_TLSv1_2', 6); 22 } 23 // @codingStandardsIgnoreEnd 8 24 9 25 class CurlClient implements ClientInterface … … 151 167 $opts[CURLOPT_SSL_VERIFYPEER] = false; 152 168 } 153 154 // @codingStandardsIgnoreStart155 // PSR2 requires all constants be upper case. Sadly, the CURL_SSLVERSION156 // constants to not abide by those rules.157 //158 // Explicitly set a TLS version for cURL to use now that we're starting159 // to block 1.0 and 1.1 requests.160 //161 // If users are on OpenSSL >= 1.0.1, we know that they support TLS 1.2,162 // so set that explicitly because on some older Linux distros, clients may163 // default to TLS 1.0 even when they have TLS 1.2 available.164 //165 // For users on much older versions of OpenSSL, set a valid range of166 // TLS 1.0 to 1.2 (CURL_SSLVERSION_TLSv1). Note that this may result in167 // their requests being blocked unless they're specially flagged into168 // being able to use an old TLS version.169 //170 // Note: The int on the right is pulled from the source of OpenSSL 1.0.1a.171 if (OPENSSL_VERSION_NUMBER >= 0x1000100f) {172 if (!defined('CURL_SSLVERSION_TLSv1_2')) {173 // Note the value 6 comes from its position in the enum that174 // defines it in cURL's source code.175 define('CURL_SSLVERSION_TLSv1_2', 6); // constant not defined in PHP < 5.5176 }177 $opts[CURLOPT_SSLVERSION] = CURL_SSLVERSION_TLSv1_2;178 } else {179 if (!defined('CURL_SSLVERSION_TLSv1')) {180 define('CURL_SSLVERSION_TLSv1', 1); // constant not defined in PHP < 5.5181 }182 $opts[CURLOPT_SSLVERSION] = CURL_SSLVERSION_TLSv1;183 }184 // @codingStandardsIgnoreEnd185 169 186 170 curl_setopt_array($curl, $opts); -
gravity-forms-stripe/trunk/includes/api/stripe-php/lib/Stripe.php
r1504158 r1517034 28 28 public static $verifySslCerts = true; 29 29 30 const VERSION = '3.21.0'; 30 // @var array The application's information (name, version, URL) 31 public static $appInfo = null; 32 33 const VERSION = '4.0.1'; 31 34 32 35 /** … … 98 101 self::$accountId = $accountId; 99 102 } 103 104 /** 105 * @return array | null The application's information 106 */ 107 public static function getAppInfo() 108 { 109 return self::$appInfo; 110 } 111 112 /** 113 * @param string $appName The application's name 114 * @param string $appVersion The application's version 115 * @param string $appUrl The application's URL 116 */ 117 public static function setAppInfo($appName, $appVersion = null, $appUrl = null) 118 { 119 if (self::$appInfo === null) { 120 self::$appInfo = array(); 121 } 122 self::$appInfo['name'] = $appName; 123 self::$appInfo['version'] = $appVersion; 124 self::$appInfo['url'] = $appUrl; 125 } 100 126 } -
gravity-forms-stripe/trunk/includes/api/stripe-php/lib/Util/Util.php
r1504158 r1517034 67 67 'account' => 'PPP\\Stripe\\Account', 68 68 'alipay_account' => 'PPP\\Stripe\\AlipayAccount', 69 'apple_pay_domain' => 'PPP\\Stripe\\ApplePayDomain', 69 70 'bank_account' => 'PPP\\Stripe\\BankAccount', 70 71 'balance_transaction' => 'PPP\\Stripe\\BalanceTransaction', … … 82 83 'token' => 'PPP\\Stripe\\Token', 83 84 'transfer' => 'PPP\\Stripe\\Transfer', 85 'transfer_reversal' => 'PPP\\Stripe\\TransferReversal', 84 86 'order' => 'PPP\\Stripe\\Order', 85 87 'order_return' => 'PPP\\Stripe\\OrderReturn', … … 91 93 'source' => 'PPP\\Stripe\\Source', 92 94 'subscription' => 'PPP\\Stripe\\Subscription', 95 'subscription_item' => 'PPP\\Stripe\\SubscriptionItem', 93 96 'three_d_secure' => 'PPP\\Stripe\\ThreeDSecure', 94 97 'fee_refund' => 'PPP\\Stripe\\ApplicationFeeRefund', -
gravity-forms-stripe/trunk/includes/class-gfp-stripe.php
r1371732 r1517034 2 2 /** 3 3 * @package GFP_Stripe 4 * @copyright 2013-201 4gravity+4 * @copyright 2013-2016 gravity+ 5 5 * @license GPL-2.0+ 6 6 * @since 0.1.0 … … 45 45 * @var string 46 46 */ 47 private static $version = '1.9.2. 7';47 private static $version = '1.9.2.9'; 48 48 49 49 /** -
gravity-forms-stripe/trunk/readme.txt
r1504158 r1517034 4 4 Tags: stripe, form, forms, gravity, gravity form, gravity forms, gravityforms, payment, payments, subscribe, subscriptions, recurring billing, paypal, authorize.net, credit cards, online payment, ecommerce, membership 5 5 Requires at least: 3.9 6 Tested up to: 4. 57 Stable tag: 1.9.2. 86 Tested up to: 4.6 7 Stable tag: 1.9.2.9 8 8 9 9 Build your own completely custom credit card payment forms with Stripe & Gravity Forms! … … 168 168 169 169 == Changelog == 170 171 = 1.9.2.9 (Oct 2016) = 172 173 * **Processing** 174 175 * Add latest Stripe API changes 176 177 * **Developers** 178 179 * Update to latest Stripe PHP library 170 180 171 181 = 1.9.2.8 (Sep 2016) = … … 663 673 664 674 == Upgrade Notice == 675 = 1.9.2.9 = 676 DO NOT UPDATE if you are using More Stripe and don't have version 1.9 or greater (email support for latest version). Update Stripe PHP library. 677 665 678 = 1.9.2.8 = 666 679 DO NOT UPDATE if you are using More Stripe and don't have version 1.9 or greater (email support for latest version). Update Stripe PHP library.
Note: See TracChangeset
for help on using the changeset viewer.