Skip to content

Commit

Permalink
Merge pull request #124 from buckaroo-it/BP-3355-Fix-error-No-recipie…
Browse files Browse the repository at this point in the history
…nt-category-found-for-Billink

fix
  • Loading branch information
vegimcarkaxhija authored Jan 16, 2024
2 parents 7a444ec + 91a00f6 commit d3e4218
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions library/checkout/billinkcheckout.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,12 @@ public function getArticles()

public function getRecipientCategory()
{
if ($this->customerType == self::CUSTOMER_TYPE_BOTH && $this->companyExists($this->invoice_address->company)) {
return self::CUSTOMER_TYPE_B2B;
$category = self::CUSTOMER_TYPE_B2C;
if ($this->customerType == self::CUSTOMER_TYPE_B2B ||
($this->customerType == self::CUSTOMER_TYPE_BOTH && $this->companyExists($this->invoice_address->company))) {
$category = self::CUSTOMER_TYPE_B2B;
}
return $this->customerType;
return $category;
}

protected function prepareProductArticles()
Expand Down

0 comments on commit d3e4218

Please sign in to comment.