Skip to content

Commit

Permalink
gravityform - invoice mapping added
Browse files Browse the repository at this point in the history
  • Loading branch information
mayur.vachchewar committed Sep 28, 2021
1 parent 23975bc commit 25c0ed1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Clients/SdkClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ protected function prepareRequestObjects()
if ($this->hasArgument(RequestArg::AUTH_AMOUNT)) {
$this->builderArgs['authAmount'] = array($this->getArgument(RequestArg::AUTH_AMOUNT));
}

if ($this->hasArgument(RequestArg::INVOICE_NUMBER)) {
$this->builderArgs['invoiceNumber'] = array($this->getArgument(RequestArg::INVOICE_NUMBER));
}
}

/**
Expand Down
6 changes: 6 additions & 0 deletions src/Data/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ class Order
*/
public $transactionType;

/**
* @var string
*/
public $invoiceNumber;

/**
* @return Array<string,mixed>
*/
Expand All @@ -72,6 +77,7 @@ public function asArray()
RequestArg::REQUEST_MULTI_USE_TOKEN => $this->requestMultiUseToken,
RequestArg::SHIPPING_ADDRESS => $this->shippingAddress,
RequestArg::TXN_TYPE => $this->transactionType,
RequestArg::INVOICE_NUMBER => $this->invoiceNumber,
);
}
}
1 change: 1 addition & 0 deletions src/Requests/RequestArg.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ abstract class RequestArg
public const DESCRIPTION = 'DESCRIPTION';
public const AUTH_AMOUNT = 'AUTH_AMOUNT';
public const REQUEST_MULTI_USE_TOKEN = 'REQUEST_MULTI_USE_TOKEN';
public const INVOICE_NUMBER = 'INVOICE_NUMBER';
}

0 comments on commit 25c0ed1

Please sign in to comment.