Skip to content

Commit 1ad8f73

Browse files
authored
Merge pull request #7 from fruitcake/2.0
Merge upstream changes
2 parents 29af3ca + 985a1ad commit 1ad8f73

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

src/Message/AbstractResponse.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ abstract class AbstractResponse extends BaseAbstractResponse
1212
* @var string
1313
*/
1414
protected $code;
15+
16+
/**
17+
* @var string
18+
*/
19+
protected $message;
1520

1621
/**
1722
* {@inheritdoc}
@@ -22,7 +27,7 @@ public function __construct(RequestInterface $request, $data)
2227

2328
if (isset($this->data->error)) {
2429
$this->code = (string) $this->data->error->errorcode;
25-
$this->data = (string) $this->data->error->errormessage;
30+
$this->message = (string) $this->data->error->errormessage;
2631
}
2732
}
2833

@@ -32,7 +37,7 @@ public function __construct(RequestInterface $request, $data)
3237
public function getMessage()
3338
{
3439
if (!$this->isSuccessful()) {
35-
return $this->data;
40+
return $this->message;
3641
}
3742

3843
return null;

src/Message/PurchaseRequest.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,9 @@ public function setShippingCountrycode($value)
8787
*/
8888
protected function generateSignature()
8989
{
90-
if ($this->getPaymentMethod() == 'klarna') {
91-
return sha1(
92-
$this->getTransactionId() . $this->getEntranceCode() . $this->getAmountInteger() .
93-
$this->getShopId() . $this->getMerchantId() . $this->getMerchantKey()
94-
);
95-
}
9690
return sha1(
97-
$this->getTransactionId() . $this->getEntranceCode() .
98-
$this->getAmountInteger() . $this->getMerchantId() . $this->getMerchantKey()
91+
$this->getTransactionId() . $this->getEntranceCode() . $this->getAmountInteger() .
92+
$this->getShopId() . $this->getMerchantId() . $this->getMerchantKey()
9993
);
10094
}
10195

0 commit comments

Comments
 (0)