Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
- Fix Payment::getStatusOfSource
- Removed unused Variable in Merx::completePayment
- Update Stripe PHP Library
  • Loading branch information
tobiasfabian committed Apr 29, 2019
1 parent ce725df commit 37e4d51
Show file tree
Hide file tree
Showing 23 changed files with 441 additions and 52 deletions.
76 changes: 38 additions & 38 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/merx.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public function completePayment(array $data = []): OrderPage
kirby()->trigger('ww.merx.completePayment:before', $virtualOrderPage, $gateway, $data);

if (is_callable($gateway['completePayment'])) {
$redirect = $gateway['completePayment']($virtualOrderPage, $data);
$gateway['completePayment']($virtualOrderPage, $data);
}

$virtualOrderPage->content()->update([
Expand Down
2 changes: 1 addition & 1 deletion src/payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public static function getStatusOfSource(string $sourceString): string
{
self::setStripeApiKey();

$source = \Stripe\Source::retrieve($_GET['source']);
$source = \Stripe\Source::retrieve($sourceString);
return $source->status;
}

Expand Down
3 changes: 3 additions & 0 deletions vendor/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
'Stripe\\Collection' => $vendorDir . '/stripe/stripe-php/lib/Collection.php',
'Stripe\\CountrySpec' => $vendorDir . '/stripe/stripe-php/lib/CountrySpec.php',
'Stripe\\Coupon' => $vendorDir . '/stripe/stripe-php/lib/Coupon.php',
'Stripe\\CreditNote' => $vendorDir . '/stripe/stripe-php/lib/CreditNote.php',
'Stripe\\Customer' => $vendorDir . '/stripe/stripe-php/lib/Customer.php',
'Stripe\\Discount' => $vendorDir . '/stripe/stripe-php/lib/Discount.php',
'Stripe\\Dispute' => $vendorDir . '/stripe/stripe-php/lib/Dispute.php',
Expand Down Expand Up @@ -150,6 +151,8 @@
'Stripe\\SubscriptionItem' => $vendorDir . '/stripe/stripe-php/lib/SubscriptionItem.php',
'Stripe\\SubscriptionSchedule' => $vendorDir . '/stripe/stripe-php/lib/SubscriptionSchedule.php',
'Stripe\\SubscriptionScheduleRevision' => $vendorDir . '/stripe/stripe-php/lib/SubscriptionScheduleRevision.php',
'Stripe\\TaxId' => $vendorDir . '/stripe/stripe-php/lib/TaxId.php',
'Stripe\\TaxRate' => $vendorDir . '/stripe/stripe-php/lib/TaxRate.php',
'Stripe\\Terminal\\ConnectionToken' => $vendorDir . '/stripe/stripe-php/lib/Terminal/ConnectionToken.php',
'Stripe\\Terminal\\Location' => $vendorDir . '/stripe/stripe-php/lib/Terminal/Location.php',
'Stripe\\Terminal\\Reader' => $vendorDir . '/stripe/stripe-php/lib/Terminal/Reader.php',
Expand Down
3 changes: 3 additions & 0 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ class ComposerStaticInit1a6b0deb482e2dc1bcccd797ab955784
'Stripe\\Collection' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Collection.php',
'Stripe\\CountrySpec' => __DIR__ . '/..' . '/stripe/stripe-php/lib/CountrySpec.php',
'Stripe\\Coupon' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Coupon.php',
'Stripe\\CreditNote' => __DIR__ . '/..' . '/stripe/stripe-php/lib/CreditNote.php',
'Stripe\\Customer' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Customer.php',
'Stripe\\Discount' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Discount.php',
'Stripe\\Dispute' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Dispute.php',
Expand Down Expand Up @@ -194,6 +195,8 @@ class ComposerStaticInit1a6b0deb482e2dc1bcccd797ab955784
'Stripe\\SubscriptionItem' => __DIR__ . '/..' . '/stripe/stripe-php/lib/SubscriptionItem.php',
'Stripe\\SubscriptionSchedule' => __DIR__ . '/..' . '/stripe/stripe-php/lib/SubscriptionSchedule.php',
'Stripe\\SubscriptionScheduleRevision' => __DIR__ . '/..' . '/stripe/stripe-php/lib/SubscriptionScheduleRevision.php',
'Stripe\\TaxId' => __DIR__ . '/..' . '/stripe/stripe-php/lib/TaxId.php',
'Stripe\\TaxRate' => __DIR__ . '/..' . '/stripe/stripe-php/lib/TaxRate.php',
'Stripe\\Terminal\\ConnectionToken' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Terminal/ConnectionToken.php',
'Stripe\\Terminal\\Location' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Terminal/Location.php',
'Stripe\\Terminal\\Reader' => __DIR__ . '/..' . '/stripe/stripe-php/lib/Terminal/Reader.php',
Expand Down
3 changes: 3 additions & 0 deletions vendor/stripe/stripe-php/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
require(dirname(__FILE__) . '/lib/Collection.php');
require(dirname(__FILE__) . '/lib/CountrySpec.php');
require(dirname(__FILE__) . '/lib/Coupon.php');
require(dirname(__FILE__) . '/lib/CreditNote.php');
require(dirname(__FILE__) . '/lib/Customer.php');
require(dirname(__FILE__) . '/lib/Discount.php');
require(dirname(__FILE__) . '/lib/Dispute.php');
Expand Down Expand Up @@ -118,6 +119,8 @@
require(dirname(__FILE__) . '/lib/SubscriptionItem.php');
require(dirname(__FILE__) . '/lib/SubscriptionSchedule.php');
require(dirname(__FILE__) . '/lib/SubscriptionScheduleRevision.php');
require(dirname(__FILE__) . '/lib/TaxId.php');
require(dirname(__FILE__) . '/lib/TaxRate.php');
require(dirname(__FILE__) . '/lib/Terminal/ConnectionToken.php');
require(dirname(__FILE__) . '/lib/Terminal/Location.php');
require(dirname(__FILE__) . '/lib/Terminal/Reader.php');
Expand Down
37 changes: 34 additions & 3 deletions vendor/stripe/stripe-php/lib/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,37 @@ class Account extends ApiResource
}
use ApiOperations\Update;

/**
* Possible string representations of an account's business type.
* @link https://stripe.com/docs/api/accounts/object#account_object-business_type
*/
const BUSINESS_TYPE_COMPANY = 'company';
const BUSINESS_TYPE_INDIVIDUAL = 'individual';

/**
* Possible string representations of an account's capabilities.
* @link https://stripe.com/docs/api/accounts/object#account_object-capabilities
*/
const CAPABILITY_CARD_PAYMENTS = 'card_payments';
const CAPABILITY_LEGACY_PAYMENTS = 'legacy_payments';
const CAPABILITY_PLATFORM_PAYMENTS = 'platform_payments';

/**
* Possible string representations of an account's capability status.
* @link https://stripe.com/docs/api/accounts/object#account_object-capabilities
*/
const CAPABILITY_STATUS_ACTIVE = 'active';
const CAPABILITY_STATUS_INACTIVE = 'inactive';
const CAPABILITY_STATUS_PENDING = 'pending';

/**
* Possible string representations of an account's type.
* @link https://stripe.com/docs/api/accounts/object#account_object-type
*/
const TYPE_CUSTOM = 'custom';
const TYPE_EXPRESS = 'express';
const TYPE_STANDARD = 'standard';

public static function getSavedNestedResources()
{
static $savedNestedResources = null;
Expand Down Expand Up @@ -216,7 +247,7 @@ public static function createPerson($id, $params = null, $opts = null)

/**
* @param string|null $id The ID of the account to which the person belongs.
* @param array|null $personId The ID of the person to retrieve.
* @param string|null $personId The ID of the person to retrieve.
* @param array|null $params
* @param array|string|null $opts
*
Expand All @@ -229,7 +260,7 @@ public static function retrievePerson($id, $personId, $params = null, $opts = nu

/**
* @param string|null $id The ID of the account to which the person belongs.
* @param array|null $personId The ID of the person to update.
* @param string|null $personId The ID of the person to update.
* @param array|null $params
* @param array|string|null $opts
*
Expand All @@ -242,7 +273,7 @@ public static function updatePerson($id, $personId, $params = null, $opts = null

/**
* @param string|null $id The ID of the account to which the person belongs.
* @param array|null $personId The ID of the person to delete.
* @param string|null $personId The ID of the person to delete.
* @param array|null $params
* @param array|string|null $opts
*
Expand Down
2 changes: 1 addition & 1 deletion vendor/stripe/stripe-php/lib/Coupon.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @property int $max_redemptions
* @property StripeObject $metadata
* @property string $name
* @property int $percent_off
* @property float $percent_off
* @property int $redeem_by
* @property int $times_redeemed
* @property bool $valid
Expand Down
Loading

0 comments on commit 37e4d51

Please sign in to comment.