Skip to content

Commit

Permalink
Merge pull request #12 from code-pilots/dev-master
Browse files Browse the repository at this point in the history
Send some missing fields to PayPal
  • Loading branch information
delatbabel authored May 12, 2017
2 parents 043ebab + 14ef485 commit 8dbfaf9
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion src/Message/AuthorizeRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,16 @@ public function setComment2($value)
return $this->setParameter('comment2', $value);
}

public function getOrderId()
{
return $this->getParameter('orderid');
}

public function setOrderId($value)
{
return $this->setParameter('orderid', $value);
}

/**
* @deprecated
*/
Expand Down Expand Up @@ -234,7 +244,18 @@ public function getData()
$data['CURRENCY'] = $this->getCurrency();
$data['COMMENT1'] = $this->getDescription();
$data['COMMENT2'] = $this->getComment2();
$data['ORDERID'] = $this->getTransactionId();
$data['ORDERID'] = $this->getOrderId();

$data['BILLTOEMAIL'] = $this->getCard()->getEmail();
$data['BILLTOPHONENUM'] = $this->getCard()->getBillingPhone();

$items = $this->getItems();
if (!empty($items)) {
foreach ($items as $key => $item) {
$data['L_NAME' . $key] = $item->getName();
$data['L_QTY' . $key] = $item->getQuantity();
}
}

return $data;
}
Expand Down

0 comments on commit 8dbfaf9

Please sign in to comment.