Skip to content

Commit

Permalink
Subscription plan currency
Browse files Browse the repository at this point in the history
  • Loading branch information
mcjackson18 committed Nov 19, 2019
1 parent 55a2686 commit f16fa6e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## 2.2.7 - 2019-11-19

### Fixed

- A bug where subscriptions were not being created when the currency plan was different to the default currency in Braintree

## 2.2.6 - 2019-11-15

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "kuriousagency/commerce-braintree",
"description": "Braintree gateway for Commerce 2",
"type": "craft-plugin",
"version": "2.2.6",
"version": "2.2.7",
"keywords": [
"craft",
"cms",
Expand Down
3 changes: 2 additions & 1 deletion src/gateways/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,8 @@ public function subscribe(User $user, BasePlan $plan, SubscriptionForm $paramete
$response = (object)$this->gateway->subscription()->create([
'paymentMethodToken' => $source->token,
'planId' => $plan->reference,
'price' => $plan->price,
'price' => $plan->price,
'merchantAccountId' => $this->merchantAccountId[$plan->getCurrency()],
]);

if (!$response->success) {
Expand Down

0 comments on commit f16fa6e

Please sign in to comment.