Skip to content

Commit fa568c9

Browse files
committed
Add PayPal transactionId parameter. Closes #43 #44
1 parent 0df4b36 commit fa568c9

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/Omnipay/PayPal/Message/ExpressAuthorizeRequest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public function getData()
2525
$data['PAYMENTREQUEST_0_PAYMENTACTION'] = 'Authorization';
2626
$data['PAYMENTREQUEST_0_AMT'] = $this->getAmountDecimal();
2727
$data['PAYMENTREQUEST_0_CURRENCYCODE'] = $this->getCurrency();
28+
$data['PAYMENTREQUEST_0_INVNUM'] = $this->getTransactionId();
2829
$data['PAYMENTREQUEST_0_DESC'] = $this->getDescription();
2930

3031
// pp express specific fields

src/Omnipay/PayPal/Message/ExpressCompleteAuthorizeRequest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public function getData()
2727
$data['PAYMENTREQUEST_0_PAYMENTACTION'] = $this->action;
2828
$data['PAYMENTREQUEST_0_AMT'] = $this->getAmountDecimal();
2929
$data['PAYMENTREQUEST_0_CURRENCYCODE'] = $this->getCurrency();
30+
$data['PAYMENTREQUEST_0_INVNUM'] = $this->getTransactionId();
3031
$data['PAYMENTREQUEST_0_DESC'] = $this->getDescription();
3132

3233
$data['TOKEN'] = $this->httpRequest->query->get('token');

src/Omnipay/PayPal/Message/ProAuthorizeRequest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ public function getData()
2525
$this->validate('amount', 'card');
2626
$this->getCard()->validate();
2727

28-
$prefix = '';
29-
$data[$prefix.'PAYMENTACTION'] = $this->action;
30-
$data[$prefix.'AMT'] = $this->getAmountDecimal();
31-
$data[$prefix.'CURRENCYCODE'] = $this->getCurrency();
32-
$data[$prefix.'DESC'] = $this->getDescription();
28+
$data['PAYMENTACTION'] = $this->action;
29+
$data['AMT'] = $this->getAmountDecimal();
30+
$data['CURRENCYCODE'] = $this->getCurrency();
31+
$data['INVNUM'] = $this->getTransactionId();
32+
$data['DESC'] = $this->getDescription();
3333

3434
// add credit card details
3535
$data['ACCT'] = $this->getCard()->getNumber();

0 commit comments

Comments
 (0)