Skip to content

Commit

Permalink
Fixed a call to Laravel helper methods that sometimes failed due to c…
Browse files Browse the repository at this point in the history
…omposer dependency issues
  • Loading branch information
sjelfull committed Aug 24, 2021
1 parent 918325a commit e2e6a64
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ 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/).

## 1.0.8 - 2021-08-24

### Fixed
- Fixed a call to Laravel helper methods that sometimes failed due to composer dependency issues

## 1.0.7 - 2021-03-03

> {warning} This release fixes a issue with completed orders not being marked as paid, so upgrading is strongly recommended.
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": "superbig/craft-vipps",
"description": "Integrate Commerce with Vipps",
"type": "craft-plugin",
"version": "1.0.7",
"version": "1.0.8",
"keywords": [
"craft",
"cms",
Expand Down
5 changes: 3 additions & 2 deletions src/controllers/CallbackController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use craft\commerce\models\Transaction;
use craft\commerce\Plugin;
use craft\commerce\records\Transaction as TransactionRecord;
use craft\helpers\ArrayHelper;
use craft\helpers\Json;
use superbig\vipps\behaviors\TransactionBehavior;
use superbig\vipps\helpers\LogToFile;
Expand Down Expand Up @@ -139,8 +140,8 @@ public function actionComplete($orderId = null)
$shippingDetails = $payload['shippingDetails'];
$addressPayload = $shippingDetails['address'];
$address = new Address([
'firstName' => \data_get($payload, 'userDetails.firstName'),
'lastName' => \data_get($payload, 'userDetails.lastName'),
'firstName' => ArrayHelper::getValue($payload, 'userDetails.firstName'),
'lastName' => ArrayHelper::getValue($payload, 'userDetails.lastName'),
'address1' => $addressPayload['addressLine1'] ?? null,
'address2' => $addressPayload['addressLine2'] ?? null,
'city' => $addressPayload['city'],
Expand Down

0 comments on commit e2e6a64

Please sign in to comment.