Skip to content

Commit 14ef485

Browse files
committed
Send some missing fields to PayPal
1 parent 4a89c04 commit 14ef485

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

src/Message/AuthorizeRequest.php

+22-1
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,16 @@ public function setComment2($value)
178178
return $this->setParameter('comment2', $value);
179179
}
180180

181+
public function getOrderId()
182+
{
183+
return $this->getParameter('orderid');
184+
}
185+
186+
public function setOrderId($value)
187+
{
188+
return $this->setParameter('orderid', $value);
189+
}
190+
181191
/**
182192
* @deprecated
183193
*/
@@ -234,7 +244,18 @@ public function getData()
234244
$data['CURRENCY'] = $this->getCurrency();
235245
$data['COMMENT1'] = $this->getDescription();
236246
$data['COMMENT2'] = $this->getComment2();
237-
$data['ORDERID'] = $this->getTransactionId();
247+
$data['ORDERID'] = $this->getOrderId();
248+
249+
$data['BILLTOEMAIL'] = $this->getCard()->getEmail();
250+
$data['BILLTOPHONENUM'] = $this->getCard()->getBillingPhone();
251+
252+
$items = $this->getItems();
253+
if (!empty($items)) {
254+
foreach ($items as $key => $item) {
255+
$data['L_NAME' . $key] = $item->getName();
256+
$data['L_QTY' . $key] = $item->getQuantity();
257+
}
258+
}
238259

239260
return $data;
240261
}

0 commit comments

Comments
 (0)