From 4786d5694bc04e44f0f5a16fabecb60c2c471f67 Mon Sep 17 00:00:00 2001 From: therevix Date: Wed, 16 Nov 2022 14:22:48 +0100 Subject: [PATCH] SP-246 - PHP Fatal error - fix --- src/BitPaySDK/Model/Invoice/Invoice.php | 140 +++++++++++++++++++++--- 1 file changed, 127 insertions(+), 13 deletions(-) diff --git a/src/BitPaySDK/Model/Invoice/Invoice.php b/src/BitPaySDK/Model/Invoice/Invoice.php index 48ec3235..f0ccfc6e 100644 --- a/src/BitPaySDK/Model/Invoice/Invoice.php +++ b/src/BitPaySDK/Model/Invoice/Invoice.php @@ -113,6 +113,7 @@ public function __construct(float $price = null, string $currency = null) /** * Gets currency + * * ISO 4217 3-character currency code. This is the currency associated with the price field, * supported currencies are available via the * Currencies resource @@ -129,6 +130,7 @@ public function getCurrency() /** * Sets currency + * * ISO 4217 3-character currency code. This is the currency associated with the price field, * supported currencies are available via the * Currencies resource @@ -148,6 +150,7 @@ public function setCurrency(string $currency) /** * Gets guid + * * A passthru variable provided by the merchant and designed to be used by the merchant * to correlate the invoice with an order ID in their system, * which can be used as a lookup variable in Retrieve Invoice by GUID. @@ -161,6 +164,7 @@ public function getGuid() /** * Sets guid + * * A passthru variable provided by the merchant and designed to be used by the merchant * to correlate the invoice with an order ID in their system, * which can be used as a lookup variable in Retrieve Invoice by GUID. @@ -174,6 +178,7 @@ public function setGuid(string $guid) /** * Gets token + * * Invoice resource token. This token is derived from the API token initially used * to create the invoice and is tied to the specific resource id created. * @@ -188,6 +193,7 @@ public function getToken() // /** * Sets token + * * Invoice resource token. * This token is derived from the API token initially used to create the * invoice and is tied to the specific resource id created. @@ -201,6 +207,7 @@ public function setToken(string $token) /** * Gets price + * * Fixed price amount for the checkout, in the "currency" of the invoice object. * * @return float @@ -212,6 +219,7 @@ public function getPrice() /** * Sets price + * * Fixed price amount for the checkout, in the "currency" of the invoice object. * * @param float $price @@ -224,6 +232,7 @@ public function setPrice(float $price) /** * Gets posData + * * A passthru variable provided by the merchant during invoice creation and designed to be * used by the merchant to correlate the invoice with an order or other object in their system. * This passthru variable can be a serialized object. @@ -237,6 +246,7 @@ public function getPosData() /** * Sets posData + * * A passthru variable provided by the merchant during invoice creation and designed to be * used by the merchant to correlate the invoice with an order or other object in their system. * This passthru variable can be a serialized object. @@ -270,6 +280,7 @@ public function setNotificationURL(string $notificationURL) /** * Gets transactionSpeed. + * * This is a risk mitigation parameter for the merchant to configure how they want * to fulfill orders depending on the number of block confirmations for the transaction * made by the consumer on the selected cryptocurrency. @@ -286,6 +297,7 @@ public function getTransactionSpeed() /** * Sets transactionSpeed. + * * This is a risk mitigation parameter for the merchant to configure how they want * to fulfill orders depending on the number of block confirmations for the transaction * made by the consumer on the selected cryptocurrency. @@ -302,6 +314,7 @@ public function setTransactionSpeed(string $transactionSpeed) /** * Gets fullNotifications + * * This parameter is set to true by default, meaning all standard notifications * are being sent for a payment made to an invoice. * If you decide to set it to false instead, only 1 webhook will be sent for each @@ -318,6 +331,7 @@ public function getFullNotifications() /** * Sets fullNotifications + * * This parameter is set to true by default, meaning all standard notifications * are being sent for a payment made to an invoice. * If you decide to set it to false instead, only 1 webhook will be sent for each @@ -334,6 +348,7 @@ public function setFullNotifications(bool $fullNotifications) /** * Gets NotificationEmail + * * Merchant email address for notification of payout status change. * * @return string @@ -345,6 +360,7 @@ public function getNotificationEmail() /** * Sets NotificationEmail + * * Merchant email address for notification of payout status change. * * @param string $notificationEmail @@ -356,6 +372,7 @@ public function setNotificationEmail(string $notificationEmail) /** * Gets RedirectURL + * * The shopper will be redirected to this URL when clicking on the Return button * after a successful payment or when clicking on the Close button if a separate closeURL is not specified. * @@ -368,6 +385,7 @@ public function getRedirectURL() /** * Sets RedirectURL + * * The shopper will be redirected to this URL when clicking on the Return button * after a successful payment or when clicking on the Close button if a separate closeURL is not specified. * Be sure to include "http://" or "https://" in the url. @@ -381,6 +399,7 @@ public function setRedirectURL(string $redirectURL) /** * Gets orderId + * * Can be used by the merchant to assign their own internal Id to an invoice. * If used, there should be a direct match between an orderId and an invoice id. * @@ -393,6 +412,7 @@ public function getOrderId() /** * Sets orderId + * * Can be used by the merchant to assign their own internal Id to an invoice. * If used, there should be a direct match between an orderId and an invoice id. * @@ -406,6 +426,7 @@ public function setOrderId(string $orderId) /** * Gets itemDesc + * * Invoice description - will be added as a line item on the BitPay checkout page, under the merchant name. * * @return string @@ -418,6 +439,7 @@ public function getItemDesc() /** * Sets itemDesc + * * Invoice description - will be added as a line item on the BitPay checkout page, under the merchant name. * * @param string $itemDesc @@ -429,6 +451,7 @@ public function setItemDesc(string $itemDesc) /** * Gets itemCode + * * "bitcoindonation" for donations, otherwise do not include the field in the request. * * @return string @@ -440,6 +463,7 @@ public function getItemCode() /** * Sets itemCode + * * "bitcoindonation" for donations, otherwise do not include the field in the request. * * @param string $itemCode @@ -451,6 +475,7 @@ public function setItemCode(string $itemCode) /** * Gets physical. + * * Indicates whether items are physical goods. Alternatives include digital goods and services. * * @return bool @@ -462,6 +487,7 @@ public function getPhysical() /** * Sets physical. + * * Indicates whether items are physical goods. Alternatives include digital goods and services. * * @param bool $physical @@ -473,6 +499,7 @@ public function setPhysical(bool $physical) /** * Gets paymentCurrencies + * * Allow the merchant to select the cryptocurrencies available as payment option on the BitPay invoice. * Possible values are currently "BTC", "BCH", "ETH", "GUSD", * "PAX", "BUSD", "USDC", "XRP", "DOGE", "DAI" and "WBTC". @@ -488,6 +515,7 @@ public function getPaymentCurrencies() /** * Sets paymentCurrencies + * * Allow the merchant to select the cryptocurrencies available as payment option on the BitPay invoice. * Possible values are currently "BTC", "BCH", "ETH", "GUSD", * "PAX", "BUSD", "USDC", "XRP", "DOGE", "DAI" and "WBTC". @@ -503,6 +531,7 @@ public function setPaymentCurrencies(array $paymentCurrencies) /** * Gets acceptanceWindow + * * Number of milliseconds that a user has to pay an invoice before it expires (0-900000). * If not set, invoice will default to the account acceptanceWindow. * If account acceptanceWindow is not set, invoice will default to 15 minutes (900,000 milliseconds). @@ -517,6 +546,7 @@ public function getAcceptanceWindow() /** * Gets closeURL + * * URL to redirect if the shopper does not pay the invoice and click on the Close button instead. * * @return string @@ -528,6 +558,7 @@ public function getCloseURL() /** * Gets closeURL + * * URL to redirect if the shopper does not pay the invoice and click on the Close button instead. * Be sure to include "http://" or "https://" in the url. * @@ -540,6 +571,7 @@ public function setCloseURL(string $closeURL) /** * Gets autoRedirect + * * Set to false by default, * merchant can setup automatic redirect to their website by setting this parameter to true. * @@ -552,6 +584,7 @@ public function getAutoRedirect() /** * Sets autoRedirect + * * Set to false by default, * merchant can setup automatic redirect to their website by setting this parameter to true. * @@ -564,6 +597,7 @@ public function setAutoRedirect(bool $autoRedirect) /** * Gets jsonPayProRequired + * * Boolean set to false by default. * If set to true, this means that the invoice will only accept payments * from wallets which have implemented the @@ -578,6 +612,7 @@ public function getJsonPayProRequired() /** * Sets jsonPayProRequired + * * Boolean set to false by default. * If set to true, this means that the invoice will only accept payments * from wallets which have implemented the @@ -592,6 +627,7 @@ public function setJsonPayProRequired(bool $jsonPayProRequired) /** * Gets bitpayIdRequired + * * BitPay ID is a verification process that is required when a user is making payments * or receiving a refund over a given threshold, which may vary by region. * This Boolean forces the invoice to require BitPay ID regardless of the price. @@ -605,6 +641,7 @@ public function getBitpayIdRequired() /** * Sets bitpayIdRequired + * * BitPay ID is a verification process that is required when a user is making payments * or receiving a refund over a given threshold, which may vary by region. * This Boolean forces the invoice to require BitPay ID regardless of the price. @@ -618,6 +655,7 @@ public function setBitpayIdRequired(bool $bitpayIdRequired) /** * Gets merchantName + * * A display string for merchant identification (ex. Wal-Mart Store #1452, Bowling Green, KY). * * @return mixed @@ -629,6 +667,7 @@ public function getMerchantName() /** * Sets merchantName + * * A display string for merchant identification (ex. Wal-Mart Store #1452, Bowling Green, KY). * * @param string $merchantName @@ -640,6 +679,7 @@ public function setMerchantName(string $merchantName) /** * Gets selectedTransactionCurrency + * * This field will be populated with the cryptocurrency selected to pay the BitPay invoice, * current supported values are "BTC", "BCH", "ETH", "GUSD", "PAX", "BUSD", * "USDC", "XRP", "DOGE", "DAI" and "WBTC". @@ -654,6 +694,7 @@ public function getSelectedTransactionCurrency() /** * Sets selectedTransactionCurrency + * * This field will be populated with the cryptocurrency selected to pay the BitPay invoice, * current supported values are "BTC", "BCH", "ETH", "GUSD", "PAX", "BUSD", * "USDC", "XRP", "DOGE", "DAI" and "WBTC". @@ -668,6 +709,7 @@ public function setSelectedTransactionCurrency(string $selectedTransactionCurren /** * Gets forcedBuyerSelectedWallet + * * Merchant pre-selects transaction currency on behalf of buyer. * * @return mixed @@ -679,6 +721,7 @@ public function getForcedBuyerSelectedWallet() /** * Sets forcedBuyerSelectedWallet + * * Merchant pre-selects transaction currency on behalf of buyer. * * @param string $forcedBuyerSelectedWallet @@ -690,6 +733,7 @@ public function setForcedBuyerSelectedWallet(string $forcedBuyerSelectedWallet) /** * Gets forcedBuyerSelectedWallet + * * Merchant pre-selects transaction currency on behalf of buyer. * * @return string @@ -701,6 +745,7 @@ public function getForcedBuyerSelectedTransactionCurrency() /** * Sets forcedBuyerSelectedWallet + * * Merchant pre-selects transaction currency on behalf of buyer. * * @param string $forcedBuyerSelectedTransactionCurrency @@ -712,6 +757,7 @@ public function setForcedBuyerSelectedTransactionCurrency(string $forcedBuyerSel /** * Gets itemizedDetails + * * Object containing line item details for display. * * @return ItemizedDetails @@ -723,6 +769,7 @@ public function getItemizedDetails() /** * Sets itemizedDetails + * * Object containing line item details for display. * * @param array $itemizedDetails @@ -758,6 +805,7 @@ public function setAcceptanceWindow(float $acceptanceWindow) /** * Gets buyer + * * Allows merchant to pass buyer related information in the invoice object * * @return Buyer @@ -769,6 +817,7 @@ public function getBuyer() /** * Sets buyer + * * Allows merchant to pass buyer related information in the invoice object * * @param Buyer $buyer @@ -780,6 +829,7 @@ public function setBuyer(Buyer $buyer) /** * Gets buyerEmail + * * Buyer's email address. * If provided during invoice creation, this will bypass the email prompt for the consumer when opening the invoice. * @@ -792,6 +842,7 @@ public function getBuyerEmail() /** * Sets buyerEmail + * * Buyer's email address. * If provided during invoice creation, this will bypass the email prompt for the consumer when opening the invoice. * @@ -804,6 +855,7 @@ public function setBuyerEmail(string $buyerEmail) /** * Gets buyerSms + * * SMS provided by user for communications. * This is only used for instances where a buyers email * (primary form of buyer communication) is can not be gathered. @@ -817,6 +869,7 @@ public function getBuyerSms() /** * Sets buyerSms + * * SMS provided by user for communications. * This is only used for instances where a buyers email * (primary form of buyer communication) is can not be gathered. @@ -833,6 +886,7 @@ public function setBuyerSms(string $buyerSms) /** * Gets refundAddresses + * * Initially empty when the invoice is created. * This field will be populated with the refund address * provided by the customer if you request a refund of the specific invoice. @@ -846,6 +900,7 @@ public function getRefundAddresses() /** * Sets refundAddresses + * * Initially empty when the invoice is created. * This field will be populated with the refund address * provided by the customer if you request a refund of the specific invoice. @@ -879,6 +934,7 @@ public function setId($id) /** * Gets url + * * Web address of invoice, expires at expirationTime * * @return string @@ -890,6 +946,7 @@ public function getUrl() /** * Sets url + * * Web address of invoice, expires at expirationTime * * @param string $url @@ -901,6 +958,7 @@ public function setUrl($url) /** * Gets status + * * Detailed information about invoice status notifications can be found under the * * Instant Payment Notification (IPN) section. @@ -915,6 +973,7 @@ public function getStatus() /** * Sets status + * * Detailed information about invoice status notifications can be found under the * * Instant Payment Notification (IPN) section. @@ -929,6 +988,7 @@ public function setStatus($status) /** * Gets lowFeeDetected + * * Flag to indicate if the miner fee used by the buyer is too low. * Initially set to false when the invoice is created. * @@ -941,6 +1001,7 @@ public function getLowFeeDetected() /** * Sets lowFeeDetected + * * Flag to indicate if the miner fee used by the buyer is too low. * Initially set to false when the invoice is created. * @@ -954,7 +1015,7 @@ public function setLowFeeDetected($lowFeeDetected) /** * Gets invoiceTime - UNIX time of invoice creation, in milliseconds * - * @return string + * @return int */ public function getInvoiceTime() { @@ -964,7 +1025,7 @@ public function getInvoiceTime() /** * Sets invoiceTime - UNIX time of invoice creation, in milliseconds * - * @param $invoiceTime + * @param int $invoiceTime */ public function setInvoiceTime($invoiceTime) { @@ -1013,6 +1074,7 @@ public function setCurrentTime($currentTime) /** * Gets transactions + * * Contains the cryptocurrency transaction details for the executed payout. * * @return array @@ -1024,6 +1086,7 @@ public function getTransactions() /** * Sets transactions + * * Contains the cryptocurrency transaction details for the executed payout. * * @param array $transactions @@ -1035,13 +1098,14 @@ public function setTransactions($transactions) /** * Gets exceptionStatus + * * Initially a boolean false, this parameter will indicate if the purchaser sent too much ("paidOver") * or not enough funds ("paidPartial") in the transaction to pay the BitPay invoice. Possible values are: * false: default value (boolean) unless an exception is triggered. * "paidPartial": (string) if the consumer did not send enough funds when paying the invoice. * "paidOver": (string) if the consumer sent to much funds when paying the invoice. * - * @return boolean|string + * @return boolean */ public function getExceptionStatus() { @@ -1050,13 +1114,14 @@ public function getExceptionStatus() /** * Sets exceptionStatus + * * Initially a boolean false, this parameter will indicate if the purchaser sent too much ("paidOver") * or not enough funds ("paidPartial") in the transaction to pay the BitPay invoice. Possible values are: * false: default value (boolean) unless an exception is triggered. * "paidPartial": (string) if the consumer did not send enough funds when paying the invoice. * "paidOver": (string) if the consumer sent to much funds when paying the invoice. * - * @param boolean|string $exceptionStatus + * @param boolean $exceptionStatus */ public function setExceptionStatus($exceptionStatus) { @@ -1065,12 +1130,13 @@ public function setExceptionStatus($exceptionStatus) /** * Gets targetConfirmations + * * Indicates the number of block confirmation of the crypto currency * transaction which are required to credit a paid invoice to the merchant account. * Currently, the value set is set to 6 by default for BTC/BCH/XRP, * 40 for DOGE and 50 for ETH/GUSD/PAX/USDC/BUSD/DAI/WBTC * - * @return numeric + * @return int */ public function getTargetConfirmations() { @@ -1079,12 +1145,13 @@ public function getTargetConfirmations() /** * Sets targetConfirmations + * * Indicates the number of block confirmation of the crypto currency * transaction which are required to credit a paid invoice to the merchant account. * Currently, the value set is set to 6 by default for BTC/BCH/XRP, * 40 for DOGE and 50 for ETH/GUSD/PAX/USDC/BUSD/DAI/WBTC - * - * @param numeric $targetConfirmations + *c + * @param int $targetConfirmations */ public function setTargetConfirmations($targetConfirmations) { @@ -1093,6 +1160,7 @@ public function setTargetConfirmations($targetConfirmations) /** * Gets refundAddressRequestPending + * * Initially set to false when the invoice is created, * this field will be set to true once a refund request has been issued by the merchant. * This flag is here to indicate that the refund request is pending action @@ -1108,6 +1176,7 @@ public function getRefundAddressRequestPending() /** * Sets refundAddressRequestPending + * * Initially set to false when the invoice is created, * this field will be set to true once a refund request has been issued by the merchant. * This flag is here to indicate that the refund request is pending action @@ -1123,6 +1192,7 @@ public function setRefundAddressRequestPending($refundAddressRequestPending) /** * Gets buyerProvidedEmail + * * Populated with the buyer's email address if passed in the buyer object by the merchant, * otherwise this field is not returned for newly created invoices. * If the merchant does not pass the buyer email in the invoice request, @@ -1138,6 +1208,7 @@ public function getBuyerProvidedEmail() /** * Sets buyerProvidedEmail + * * Populated with the buyer's email address if passed in the buyer object by the merchant, * otherwise this field is not returned for newly created invoices. * If the merchant does not pass the buyer email in the invoice request, @@ -1153,6 +1224,7 @@ public function setBuyerProvidedEmail($buyerProvidedEmail) /** * Gets buyerProvidedEmail + * * Information collected from the buyer during the process of paying an invoice. * Initially this object is empty. * @@ -1165,6 +1237,7 @@ public function getBuyerProvidedInfo() /** * Sets buyerProvidedEmail + * * Information collected from the buyer during the process of paying an invoice. * Initially this object is empty. * @@ -1187,6 +1260,7 @@ public function setTransactionDetails(TransactionDetails $transactionDetails) /** * Gets universalCodes + * * Object containing wallet-specific URLs for payment protocol. * * @return object UniversalCodes @@ -1242,6 +1316,7 @@ public function setSupportedTransactionCurrencies(SupportedTransactionCurrencies /** * Gets paymentTotals + * * For internal use - This field can be ignored in merchant implementations. * * @return object @@ -1253,9 +1328,10 @@ public function getPaymentTotals() /** * Sets paymentTotals + * * For internal use - This field can be ignored in merchant implementations. * - * @param $paymentTotals + * @param object $paymentTotals */ public function setPaymentTotals($paymentTotals) { @@ -1264,6 +1340,7 @@ public function setPaymentTotals($paymentTotals) /** * Gets paymentSubtotals + * * For internal use. This field can be ignored in merchant implementations. * * @return object @@ -1275,9 +1352,10 @@ public function getPaymentSubTotals() /** * Sets paymentSubtotals + * * For internal use. This field can be ignored in merchant implementations. * - * @param $paymentSubtotals + * @param object $paymentSubtotals */ public function setPaymentSubTotals($paymentSubtotals) { @@ -1286,6 +1364,7 @@ public function setPaymentSubTotals($paymentSubtotals) /** * Gets paymentDisplaySubtotals + * * Equivalent to price for each supported transactionCurrency, excluding minerFees. * The key is the currency and the value is an amount indicated in the base unit * for each supported transactionCurrency. @@ -1299,11 +1378,12 @@ public function getPaymentDisplaySubTotals() /** * Sets paymentDisplaySubtotals + * * Equivalent to price for each supported transactionCurrency, excluding minerFees. * The key is the currency and the value is an amount indicated in the base unit * for each supported transactionCurrency. * - * @param $paymentDisplaySubtotals + * @param object $paymentDisplaySubtotals */ public function setPaymentDisplaySubTotals($paymentDisplaySubtotals) { @@ -1312,6 +1392,7 @@ public function setPaymentDisplaySubTotals($paymentDisplaySubtotals) /** * Gets paymentDisplayTotals + * * The total amount that the purchaser should pay as displayed on the invoice UI. * This is like paymentDisplaySubTotals but with the minerFees included. * The key is the currency and the value is an amount @@ -1326,12 +1407,13 @@ public function getPaymentDisplayTotals() /** * Sets paymentDisplayTotals + * * The total amount that the purchaser should pay as displayed on the invoice UI. * This is like paymentDisplaySubTotals but with the minerFees included. * The key is the currency and the value is an amount * indicated in the base unit for each supported transactionCurrency. * - * @param $paymentDisplaytotals + * @param object $paymentDisplaytotals */ public function setPaymentDisplayTotals($paymentDisplaytotals) { @@ -1340,6 +1422,7 @@ public function setPaymentDisplayTotals($paymentDisplaytotals) /** * Gets paymentCodes + * * The URIs for sending a transaction to the invoice. The first key is the transaction currency. * The transaction currency maps to an object containing the payment URIs. * The key of this object is the BIP number and the value is the payment URI. @@ -1356,6 +1439,7 @@ public function getPaymentCodes() /** * Sets paymentCodes + * * The URIs for sending a transaction to the invoice. The first key is the transaction currency. * The transaction currency maps to an object containing the payment URIs. * The key of this object is the BIP number and the value is the payment URI. @@ -1372,6 +1456,7 @@ public function setPaymentCodes($paymentCodes) /** * Gets underpaidAmount + * * This parameter will be returned on the invoice object * if the invoice was underpaid ("exceptionStatus": "paidPartial"). * It equals to the absolute difference between amountPaid @@ -1386,6 +1471,7 @@ public function getUnderpaidAmount() /** * Sets underpaidAmount + * * This parameter will be returned on the invoice object * if the invoice was underpaid ("exceptionStatus": "paidPartial"). * It equals to the absolute difference between amountPaid @@ -1400,6 +1486,7 @@ public function setUnderpaidAmount($underpaidAmount) /** * Gets overpaidAmount + * * This parameter will be returned on the invoice object * if the invoice was overpaid ("exceptionStatus": "paidOver"). * It equals to the absolute difference between amountPaid @@ -1414,6 +1501,7 @@ public function getOverpaidAmount() /** * Sets overpaidAmount + * * This parameter will be returned on the invoice object * if the invoice was overpaid ("exceptionStatus": "paidOver"). * It equals to the absolute difference between amountPaid @@ -1428,6 +1516,7 @@ public function setOverpaidAmount($overpaidAmount) /** * Gets minerFees + * * The total amount of fees that the purchaser will pay to cover BitPay's UTXO sweep cost for an invoice. * The key is the currency and the value is an object containing * the satoshis per byte, the total fee, and the fiat amount. @@ -1445,6 +1534,7 @@ public function getMinerFees() /** * Sets minerFees + * * The total amount of fees that the purchaser will pay to cover BitPay's UTXO sweep cost for an invoice. * The key is the currency and the value is an object containing * the satoshis per byte, the total fee, and the fiat amount. @@ -1462,6 +1552,7 @@ public function setMinerFees(MinerFees $minerFees) /** * Gets nonPayProPaymentReceived + * * This boolean will be available on an invoice object once an invoice is paid * and indicate if the transaction was made with a wallet using the payment protocol (true) or peer to peer (false). * @@ -1474,6 +1565,7 @@ public function getNonPayProPaymentReceived() /** * Sets nonPayProPaymentReceived + * * This boolean will be available on an invoice object once an invoice is paid * and indicate if the transaction was made with a wallet using the payment protocol (true) or peer to peer (false). * @@ -1486,6 +1578,7 @@ public function setNonPayProPaymentReceived(bool $nonPayProPaymentReceived) /** * Gets shopper + * * This object will be available on the invoice if a shopper signs in on an invoice using his BitPay ID. * See the following blogpost for more information. * @@ -1498,6 +1591,7 @@ public function getShopper() /** * Sets shopper + * * This object will be available on the invoice if a shopper signs in on an invoice using his BitPay ID. * See the following blogpost for more information. * @@ -1510,6 +1604,7 @@ public function setShopper(Shopper $shopper) /** * Gets billId + * * This field will be in the invoice object only if the invoice was generated from a bill, see the * Bills resource for more information * @@ -1522,6 +1617,7 @@ public function getBillId() /** * Sets billId + * * This field will be in the invoice object only if the invoice was generated from a bill, see the * Bills resource for more information * @@ -1534,6 +1630,7 @@ public function setBillId($billId) /** * Gets refundInfo + * * For a refunded invoice, this object will contain the details of executed refunds for the corresponding invoice. * * @return RefundInfo @@ -1545,6 +1642,7 @@ public function getRefundInfo() /** * Sets refundInfo + * * For a refunded invoice, this object will contain the details of executed refunds for the corresponding invoice. * * @param RefundInfo @@ -1556,6 +1654,7 @@ public function setRefundInfo(RefundInfo $refundInfo) /** * Gets extendedNotifications + * * Allows merchants to get access to additional webhooks. * For instance when an invoice expires without receiving a payment or when it is refunded. * If set to true, then fullNotifications is automatically set to true. @@ -1571,6 +1670,7 @@ public function getExtendedNotifications() /** * Sets extendedNotifications + * * Allows merchants to get access to additional webhooks. * For instance when an invoice expires without receiving a payment or when it is refunded. * If set to true, then fullNotifications is automatically set to true. @@ -1586,6 +1686,7 @@ public function setExtendedNotifications(bool $extendedNotifications) /** * Gets transactionCurrency + * * The cryptocurrency used to pay the invoice. * This field will only be available after a transaction is applied to the invoice. * Possible values are currently "BTC", "BCH", "ETH", "GUSD", "PAX", "BUSD", @@ -1600,6 +1701,7 @@ public function getTransactionCurrency() /** * Sets transactionCurrency + * * The cryptocurrency used to pay the invoice. * This field will only be available after a transaction is applied to the invoice. * Possible values are currently "BTC", "BCH", "ETH", "GUSD", "PAX", "BUSD", @@ -1614,6 +1716,7 @@ public function setTransactionCurrency($transactionCurrency) /** * Gets amountPaid + * * The total amount paid to the invoice in terms of the invoice transactionCurrency indicated * in the smallest possible unit for the corresponding transactionCurrency (e.g satoshis for BTC and BCH) * @@ -1626,10 +1729,11 @@ public function getAmountPaid() /** * Sets amountPaid + * * The total amount paid to the invoice in terms of the invoice transactionCurrency indicated * in the smallest possible unit for the corresponding transactionCurrency (e.g satoshis for BTC and BCH) * - * @param number $amountPaid + * @param int $amountPaid */ public function setAmountPaid($amountPaid) { @@ -1638,6 +1742,7 @@ public function setAmountPaid($amountPaid) /** * Gets displayAmountPaid + * * Initially set to "0" when creating the invoice. * It will be updated with the total amount paid to the invoice * indicated in the base unit for the corresponding transactionCurrency @@ -1651,6 +1756,7 @@ public function getDisplayAmountPaid() /** * Sets displayAmountPaid + * * Initially set to "0" when creating the invoice. * It will be updated with the total amount paid to the invoice * indicated in the base unit for the corresponding transactionCurrency @@ -1664,6 +1770,7 @@ public function setDisplayAmountPaid($displayAmountPaid) /** * Gets exchangeRates + * * Exchange rates keyed by source and target currencies. * * @return object @@ -1675,9 +1782,10 @@ public function getExchangeRates() /** * Sets exchangeRates + * * Exchange rates keyed by source and target currencies. * - * @param $exchangeRates + * @param object $exchangeRates */ public function setExchangeRates($exchangeRates) { @@ -1686,6 +1794,7 @@ public function setExchangeRates($exchangeRates) /** * Gets paymentString + * * Payment protocol URL for selected wallet, defaults to BitPay URL if no wallet selected. * * @return string @@ -1697,6 +1806,7 @@ public function getPaymentString() /** * Sets paymentString + * * Payment protocol URL for selected wallet, defaults to BitPay URL if no wallet selected. * * @param string $paymentString @@ -1708,6 +1818,7 @@ public function setPaymentString(string $paymentString) /** * Gets verificationLink + * * Link to bring user to BitPay ID flow, only present when bitpayIdRequired is true. * * @return string @@ -1719,6 +1830,7 @@ public function getVerificationLink() /** * Sets verificationLink + * * Link to bring user to BitPay ID flow, only present when bitpayIdRequired is true. * * @param string $verificationLink @@ -1730,6 +1842,7 @@ public function setVerificationLink(string $verificationLink) /** * Gets isCancelled + * * Indicates whether or not the invoice was cancelled. * * @return boolean @@ -1741,6 +1854,7 @@ public function getIsCancelled() /** * Sets isCancelled + * * Indicates whether or not the invoice was cancelled. * * @param boolean $isCancelled