Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Commit

Permalink
Fix for issue #115 where Shopify/Laravel returns charge_id as string …
Browse files Browse the repository at this point in the history
…instead of int
  • Loading branch information
gnikyt committed Oct 5, 2018
1 parent aed501b commit 05a6931
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ShopifyApp/Libraries/BillingPlan.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function getCharge()
* Activates a plan to the shop.
*
* Example usage:
* (new BillingPlan([shop], [plan]))->setChargeId(request('charge_id'))->activate();
* (new BillingPlan([shop], [plan]))->setChargeId((int) request('charge_id'))->activate();
*
* @return object
*/
Expand Down
2 changes: 1 addition & 1 deletion src/ShopifyApp/Traits/BillingControllerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function process($planId = null)
{
// Setup the shop and get the charge ID passed in
$shop = ShopifyApp::shop();
$chargeId = request('charge_id');
$chargeId = (int) request('charge_id');

// Setup the plan and get the charge
$plan = $this->getPlan($planId);
Expand Down

0 comments on commit 05a6931

Please sign in to comment.