-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fbc4dbf
commit 622de60
Showing
66 changed files
with
8,855 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,16 @@ | ||
# hikashoppayment-stripe | ||
Stripe plugin for HikaShop | ||
# HikaShop Stripe | ||
|
||
Stripe payment plugin for HikaShop (open source e-commerce solution for Joomla). | ||
|
||
## Requirements | ||
- PHP 5.3.3 and later. | ||
- HikaShop 2.6.3 and later. | ||
|
||
## Initial development | ||
HikaShop team ( http://www.hikashop.com ) | ||
|
||
## Maintainer and fixes | ||
HikaShop team ( http://www.hikashop.com ) | ||
|
||
## License | ||
GNU/GPL v2 ( http://www.gnu.org/licenses/gpl-2.0.html ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?xml version="1.0"?> | ||
<opackage> | ||
<name>Stripe Plugin</name> | ||
<base> | ||
</base> | ||
<outputs> | ||
<output type="zip" path="" filename="plg_hikashoppayment_stripe" /> | ||
</outputs> | ||
<dictionnary> | ||
<entry name="{__VERSION__}" value="1.0.0" /> | ||
<entry name="{__YEAR__}" date="yyyy" /> | ||
<entry name="{__MONTH__}" date="mm" /> | ||
<entry name="{__DAY__}" date="dd" /> | ||
<entry name="{__BUILD_NB__}" date="yyMMddHHmm" /> | ||
</dictionnary> | ||
<files> | ||
<file name="stripe.php"> | ||
<rule type="*" action="sourcecode" param="replace;commentary;header:header.txt;" /> | ||
</file> | ||
<file name="stripe_end.php"> | ||
<rule type="*" action="sourcecode" param="replace;commentary;header:header.txt;" /> | ||
</file> | ||
<file name="stripe.xml"> | ||
<rule type="*" action="sourcecode" param="replace" /> | ||
</file> | ||
<directory name="lib\" filter="*.*" subDirs="true"> | ||
<rules> | ||
<rule type="directory" action="addfile" param="index.html" /> | ||
<rule type="*.php" action="sourcecode" param="replace;commentary;header:header_namespace.txt;" /> | ||
</rules> | ||
</directory> | ||
</files> | ||
<excludes> | ||
<exclude name="*.bak" /> | ||
<exclude name="*.zip" /> | ||
</excludes> | ||
</opackage> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
/** | ||
* @package HikaShop for Joomla! | ||
* @version {__VERSION__} | ||
* @author hikashop.com | ||
* @copyright (C) 2010-{__YEAR__} HIKARI SOFTWARE. All rights reserved. | ||
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html | ||
*/ | ||
defined('_JEXEC') or die('Restricted access'); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
/** | ||
* @package HikaShop for Joomla! | ||
* @version {__VERSION__} | ||
* @author hikashop.com | ||
* @copyright (C) 2010-{__YEAR__} HIKARI SOFTWARE. All rights reserved. | ||
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html | ||
*/ | ||
?> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<?php | ||
defined('_JEXEC') or die('Restricted access'); | ||
|
||
// Requires PHP 5.3.3 and later. | ||
|
||
// This snippet (and some of the curl code) due to the Facebook SDK. | ||
if (!function_exists('curl_init')) { | ||
throw new Exception('Stripe plugin needs the CURL PHP extension.'); | ||
} | ||
if (!function_exists('json_decode')) { | ||
throw new Exception('Stripe plugin needs the JSON PHP extension.'); | ||
} | ||
if (!function_exists('mb_detect_encoding')) { | ||
throw new Exception('Stripe plugin needs the Multibyte String PHP extension.'); | ||
} | ||
|
||
/** | ||
* STRIPE LIB - 3.21.0 | ||
*/ | ||
|
||
// Stripe singleton | ||
require(dirname(__FILE__) . '/Stripe/Stripe.php'); | ||
|
||
// Utilities | ||
require(dirname(__FILE__) . '/Stripe/Util/AutoPagingIterator.php'); | ||
require(dirname(__FILE__) . '/Stripe/Util/RequestOptions.php'); | ||
require(dirname(__FILE__) . '/Stripe/Util/Set.php'); | ||
require(dirname(__FILE__) . '/Stripe/Util/Util.php'); | ||
|
||
// HttpClient | ||
require(dirname(__FILE__) . '/Stripe/HttpClient/ClientInterface.php'); | ||
require(dirname(__FILE__) . '/Stripe/HttpClient/CurlClient.php'); | ||
|
||
// Errors | ||
require(dirname(__FILE__) . '/Stripe/Error/Base.php'); | ||
require(dirname(__FILE__) . '/Stripe/Error/Api.php'); | ||
require(dirname(__FILE__) . '/Stripe/Error/ApiConnection.php'); | ||
require(dirname(__FILE__) . '/Stripe/Error/Authentication.php'); | ||
require(dirname(__FILE__) . '/Stripe/Error/Card.php'); | ||
require(dirname(__FILE__) . '/Stripe/Error/InvalidRequest.php'); | ||
require(dirname(__FILE__) . '/Stripe/Error/RateLimit.php'); | ||
|
||
// Plumbing | ||
require(dirname(__FILE__) . '/Stripe/ApiResponse.php'); | ||
require(dirname(__FILE__) . '/Stripe/JsonSerializable.php'); | ||
require(dirname(__FILE__) . '/Stripe/StripeObject.php'); | ||
require(dirname(__FILE__) . '/Stripe/ApiRequestor.php'); | ||
require(dirname(__FILE__) . '/Stripe/ApiResource.php'); | ||
require(dirname(__FILE__) . '/Stripe/SingletonApiResource.php'); | ||
require(dirname(__FILE__) . '/Stripe/AttachedObject.php'); | ||
require(dirname(__FILE__) . '/Stripe/ExternalAccount.php'); | ||
|
||
// Stripe API Resources | ||
require(dirname(__FILE__) . '/Stripe/Account.php'); | ||
require(dirname(__FILE__) . '/Stripe/AlipayAccount.php'); | ||
require(dirname(__FILE__) . '/Stripe/ApplicationFee.php'); | ||
require(dirname(__FILE__) . '/Stripe/ApplicationFeeRefund.php'); | ||
require(dirname(__FILE__) . '/Stripe/Balance.php'); | ||
require(dirname(__FILE__) . '/Stripe/BalanceTransaction.php'); | ||
require(dirname(__FILE__) . '/Stripe/BankAccount.php'); | ||
require(dirname(__FILE__) . '/Stripe/BitcoinReceiver.php'); | ||
require(dirname(__FILE__) . '/Stripe/BitcoinTransaction.php'); | ||
require(dirname(__FILE__) . '/Stripe/Card.php'); | ||
require(dirname(__FILE__) . '/Stripe/Charge.php'); | ||
require(dirname(__FILE__) . '/Stripe/Collection.php'); | ||
require(dirname(__FILE__) . '/Stripe/CountrySpec.php'); | ||
require(dirname(__FILE__) . '/Stripe/Coupon.php'); | ||
require(dirname(__FILE__) . '/Stripe/Customer.php'); | ||
require(dirname(__FILE__) . '/Stripe/Dispute.php'); | ||
require(dirname(__FILE__) . '/Stripe/Event.php'); | ||
require(dirname(__FILE__) . '/Stripe/FileUpload.php'); | ||
require(dirname(__FILE__) . '/Stripe/Invoice.php'); | ||
require(dirname(__FILE__) . '/Stripe/InvoiceItem.php'); | ||
require(dirname(__FILE__) . '/Stripe/Order.php'); | ||
require(dirname(__FILE__) . '/Stripe/OrderReturn.php'); | ||
require(dirname(__FILE__) . '/Stripe/Plan.php'); | ||
require(dirname(__FILE__) . '/Stripe/Product.php'); | ||
require(dirname(__FILE__) . '/Stripe/Recipient.php'); | ||
require(dirname(__FILE__) . '/Stripe/Refund.php'); | ||
require(dirname(__FILE__) . '/Stripe/SKU.php'); | ||
require(dirname(__FILE__) . '/Stripe/Source.php'); | ||
require(dirname(__FILE__) . '/Stripe/Subscription.php'); | ||
require(dirname(__FILE__) . '/Stripe/ThreeDSecure.php'); | ||
require(dirname(__FILE__) . '/Stripe/Token.php'); | ||
require(dirname(__FILE__) . '/Stripe/Transfer.php'); | ||
require(dirname(__FILE__) . '/Stripe/TransferReversal.php'); | ||
|
||
/** | ||
* STRIPE BRIDGE - AVOID NAMESPACE ERRORS | ||
*/ | ||
class StripeBridge { | ||
public static function setApiKey($data) { return \Stripe\Stripe::setApiKey($data); } | ||
public static function setApiVersion($data) { return \Stripe\Strip::setApiVersion($data); } | ||
public static function Charge_create($data) { return \Stripe\Charge::create($data); } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
<?php | ||
|
||
namespace Stripe; | ||
|
||
/** | ||
* Class Account | ||
* | ||
* @property string $id | ||
* @property string $object | ||
* @property mixed $business_logo | ||
* @property string $business_name | ||
* @property mixed $business_url | ||
* @property bool $charges_enabled | ||
* @property string $country | ||
* @property bool $debit_negative_balances | ||
* @property mixed $decline_charge_on | ||
* @property string $default_currency | ||
* @property bool $details_submitted | ||
* @property string $display_name | ||
* @property string $email | ||
* @property mixed $external_accounts | ||
* @property mixed $legal_entity | ||
* @property bool $managed | ||
* @property mixed $product_description | ||
* @property mixed $statement_descriptor | ||
* @property mixed $support_email | ||
* @property mixed $support_phone | ||
* @property string $timezone | ||
* @property mixed $tos_acceptance | ||
* @property mixed $transfer_schedule | ||
* @property bool $transfers_enabled | ||
* @property mixed $verification | ||
* @property mixed $keys | ||
* | ||
* @package Stripe | ||
*/ | ||
class Account extends ApiResource | ||
{ | ||
public function instanceUrl() | ||
{ | ||
if ($this['id'] === null) { | ||
return '/v1/account'; | ||
} else { | ||
return parent::instanceUrl(); | ||
} | ||
} | ||
|
||
/** | ||
* @param string|null $id | ||
* @param array|string|null $opts | ||
* | ||
* @return Account | ||
*/ | ||
public static function retrieve($id = null, $opts = null) | ||
{ | ||
if (!$opts && is_string($id) && substr($id, 0, 3) === 'sk_') { | ||
$opts = $id; | ||
$id = null; | ||
} | ||
return self::_retrieve($id, $opts); | ||
} | ||
|
||
/** | ||
* @param array|null $params | ||
* @param array|string|null $opts | ||
* | ||
* @return Account | ||
*/ | ||
public static function create($params = null, $opts = null) | ||
{ | ||
return self::_create($params, $opts); | ||
} | ||
|
||
/** | ||
* @param string $id The ID of the account to update. | ||
* @param array|null $params | ||
* @param array|string|null $options | ||
* | ||
* @return Account The updated account. | ||
*/ | ||
public static function update($id, $params = null, $options = null) | ||
{ | ||
return self::_update($id, $params, $options); | ||
} | ||
|
||
/** | ||
* @param array|string|null $opts | ||
* | ||
* @return Account | ||
*/ | ||
public function save($opts = null) | ||
{ | ||
return $this->_save($opts); | ||
} | ||
|
||
/** | ||
* @param array|null $params | ||
* @param array|string|null $opts | ||
* | ||
* @return Account The deleted account. | ||
*/ | ||
public function delete($params = null, $opts = null) | ||
{ | ||
return $this->_delete($params, $opts); | ||
} | ||
|
||
/** | ||
* @param array|null $params | ||
* @param array|string|null $opts | ||
* | ||
* @return Account The rejected account. | ||
*/ | ||
public function reject($params = null, $opts = null) | ||
{ | ||
$url = $this->instanceUrl() . '/reject'; | ||
list($response, $opts) = $this->_request('post', $url, $params, $opts); | ||
$this->refreshFrom($response, $opts); | ||
return $this; | ||
} | ||
|
||
/** | ||
* @param array|null $params | ||
* @param array|string|null $opts | ||
* | ||
* @return Collection of Accounts | ||
*/ | ||
public static function all($params = null, $opts = null) | ||
{ | ||
return self::_all($params, $opts); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Stripe; | ||
|
||
/** | ||
* Class AlipayAccount | ||
* | ||
* @package Stripe | ||
*/ | ||
class AlipayAccount extends ExternalAccount | ||
{ | ||
|
||
} |
Oops, something went wrong.