PHP Interface Bitpay\InvoiceInterface

Datei anzeigen Open project: bitpay/php-client Interface Usage Examples

Public Methods

Method Description
getBtcPaid ( )
getBtcPrice ( ) : string The amount of bitcoins being requested for payment of this invoice (same as the price if the merchant set the price in BTC).
getBuyer ( ) : BuyerInterface
getBuyerAddress1 ( ) : string These fields are used for display purposes only and will be shown on the invoice if provided. Maximum string length of each field is 100 characters.
getBuyerAddress2 ( ) : string These fields are used for display purposes only and will be shown on the invoice if provided. Maximum string length of each field is 100 characters.
getBuyerCity ( ) : string These fields are used for display purposes only and will be shown on the invoice if provided. Maximum string length of each field is 100 characters.
getBuyerCountry ( ) : string These fields are used for display purposes only and will be shown on the invoice if provided. Maximum string length of each field is 100 characters.
getBuyerEmail ( ) : string These fields are used for display purposes only and will be shown on the invoice if provided. Maximum string length of each field is 100 characters.
getBuyerName ( ) : string These fields are used for display purposes only and will be shown on the invoice if provided. Maximum string length of each field is 100 characters.
getBuyerPhone ( ) : string These fields are used for display purposes only and will be shown on the invoice if provided. Maximum string length of each field is 100 characters.
getBuyerState ( ) : string These fields are used for display purposes only and will be shown on the invoice if provided. Maximum string length of each field is 100 characters.
getBuyerZip ( ) : string These fields are used for display purposes only and will be shown on the invoice if provided. Maximum string length of each field is 100 characters.
getCurrency ( ) : bitpay\CurrencyInterface This is the currency code set for the price setting.  The pricing currencies currently supported are USD, EUR, BTC, and all of the codes listed on this page: https://bitpay.com/bitcoin­exchange­rates
getCurrentTime ( ) : DateTime The current time on the BitPay.com system (by subtracting the current time from the expiration time, the amount of time remaining for payment can be determined). Time format is “2014­01­01T19:01:01.123Z”.
getExceptionStatus ( )
getExpirationTime ( ) : DateTime The time at which the invoice expires and no further payment will be accepted (in milliseconds since midnight January 1, 1970). Currently, all invoices are valid for 15 minutes. Time format is “2014­01­01T19:01:01.123Z”.
getId ( ) : string The unique id of the invoice assigned by bitpay.com
getInvoiceTime ( ) : DateTime The time the invoice was created in milliseconds since midnight January 1, 1970. Time format is “2014­01­01T19:01:01.123Z”.
getItem ( ) : bitpay\ItemInterface
getItemCode ( ) : string Used to display an item SKU code or part number to the buyer. Maximum string length is 100 characters.
getItemDesc ( ) : string Used to display an item description to the buyer. Maximum string length is 100 characters.
getNotificationEmail ( ) : string Bitpay.com will send an email to this email address when the invoice status changes.
getNotificationUrl ( ) : string A URL to send status update messages to your server (this must be an https URL, unencrypted http URLs or any other type of URL is not supported).
getOrderId ( ) : string Used to display your public order number to the buyer on the BitPay invoice. In the merchant Account Summary page, this value is used to identify the ledger entry. Maximum string length is 100 characters.
getPosData ( ) : array | object A passthru variable provided by the merchant and designed to be used by the merchant to correlate the invoice with an order or other object in their system.
getPrice ( ) : string This is the amount that is required to be collected from the buyer. Note, if this is specified in a currency other than BTC, the price will be converted into BTC at market exchange rates to determine the amount collected from the buyer.
getRate ( )
getRedirectUrl ( ) : string This is the URL for a return link that is displayed on the receipt, to return the shopper back to your website after a successful purchase. This could be a page specific to the order, or to their account.
getStatus ( ) : string The current invoice status. The possible states are described earlier in this document.
getToken ( )
getTransactionSpeed ( ) : string default value: set in your https://bitpay.com/order­settings, the default value set in your merchant dashboard is “medium”.
getUrl ( ) : string An https URL where the invoice can be viewed.
isFullNotifications ( ) : boolean default value: false ● true: Notifications will be sent on every status change.
isPhysical ( ) : boolean default value: false ● true: Indicates a physical item will be shipped (or picked up) ● false: Indicates that nothing is to be shipped for this order

Method Details

getBtcPaid() public method

public getBtcPaid ( )

getBtcPrice() public method

The amount of bitcoins being requested for payment of this invoice (same as the price if the merchant set the price in BTC).
public getBtcPrice ( ) : string
return string

getBuyer() public method

public getBuyer ( ) : BuyerInterface
return BuyerInterface

getBuyerAddress1() public method

These fields are used for display purposes only and will be shown on the invoice if provided. Maximum string length of each field is 100 characters.
Deprecation:
public getBuyerAddress1 ( ) : string
return string

getBuyerAddress2() public method

These fields are used for display purposes only and will be shown on the invoice if provided. Maximum string length of each field is 100 characters.
Deprecation:
public getBuyerAddress2 ( ) : string
return string

getBuyerCity() public method

These fields are used for display purposes only and will be shown on the invoice if provided. Maximum string length of each field is 100 characters.
Deprecation:
public getBuyerCity ( ) : string
return string

getBuyerCountry() public method

These fields are used for display purposes only and will be shown on the invoice if provided. Maximum string length of each field is 100 characters.
Deprecation:
public getBuyerCountry ( ) : string
return string

getBuyerEmail() public method

These fields are used for display purposes only and will be shown on the invoice if provided. Maximum string length of each field is 100 characters.
Deprecation:
public getBuyerEmail ( ) : string
return string

getBuyerName() public method

These fields are used for display purposes only and will be shown on the invoice if provided. Maximum string length of each field is 100 characters.
Deprecation:
public getBuyerName ( ) : string
return string

getBuyerPhone() public method

These fields are used for display purposes only and will be shown on the invoice if provided. Maximum string length of each field is 100 characters.
Deprecation:
public getBuyerPhone ( ) : string
return string

getBuyerState() public method

These fields are used for display purposes only and will be shown on the invoice if provided. Maximum string length of each field is 100 characters.
Deprecation:
public getBuyerState ( ) : string
return string

getBuyerZip() public method

These fields are used for display purposes only and will be shown on the invoice if provided. Maximum string length of each field is 100 characters.
Deprecation:
public getBuyerZip ( ) : string
return string

getCurrency() public method

This is the currency code set for the price setting.  The pricing currencies currently supported are USD, EUR, BTC, and all of the codes listed on this page: https://bitpay.com/bitcoin­exchange­rates
public getCurrency ( ) : bitpay\CurrencyInterface
return bitpay\CurrencyInterface

getCurrentTime() public method

The current time on the BitPay.com system (by subtracting the current time from the expiration time, the amount of time remaining for payment can be determined). Time format is “2014­01­01T19:01:01.123Z”.
public getCurrentTime ( ) : DateTime
return DateTime

getExceptionStatus() public method

public getExceptionStatus ( )

getExpirationTime() public method

The time at which the invoice expires and no further payment will be accepted (in milliseconds since midnight January 1, 1970). Currently, all invoices are valid for 15 minutes. Time format is “2014­01­01T19:01:01.123Z”.
public getExpirationTime ( ) : DateTime
return DateTime

getId() public method

The unique id of the invoice assigned by bitpay.com
public getId ( ) : string
return string

getInvoiceTime() public method

The time the invoice was created in milliseconds since midnight January 1, 1970. Time format is “2014­01­01T19:01:01.123Z”.
public getInvoiceTime ( ) : DateTime
return DateTime

getItem() public method

public getItem ( ) : bitpay\ItemInterface
return bitpay\ItemInterface

getItemCode() public method

Used to display an item SKU code or part number to the buyer. Maximum string length is 100 characters.
Deprecation:
public getItemCode ( ) : string
return string

getItemDesc() public method

Used to display an item description to the buyer. Maximum string length is 100 characters.
Deprecation:
public getItemDesc ( ) : string
return string

getNotificationEmail() public method

Bitpay.com will send an email to this email address when the invoice status changes.
public getNotificationEmail ( ) : string
return string

getNotificationUrl() public method

Bitpay.com will send a POST request with a JSON encoding of the invoice to this URL when the invoice status changes.
public getNotificationUrl ( ) : string
return string

getOrderId() public method

Used to display your public order number to the buyer on the BitPay invoice. In the merchant Account Summary page, this value is used to identify the ledger entry. Maximum string length is 100 characters.
public getOrderId ( ) : string
return string

getPosData() public method

Maximum string length is 100 characters.
public getPosData ( ) : array | object
return array | object

getPrice() public method

This is the amount that is required to be collected from the buyer. Note, if this is specified in a currency other than BTC, the price will be converted into BTC at market exchange rates to determine the amount collected from the buyer.
public getPrice ( ) : string
return string

getRate() public method

public getRate ( )

getRedirectUrl() public method

This is the URL for a return link that is displayed on the receipt, to return the shopper back to your website after a successful purchase. This could be a page specific to the order, or to their account.
public getRedirectUrl ( ) : string
return string

getStatus() public method

The current invoice status. The possible states are described earlier in this document.
public getStatus ( ) : string
return string

getToken() public method

public getToken ( )

getTransactionSpeed() public method

● “high”: An invoice is considered to be "confirmed" immediately upon receipt of payment. ● “medium”: An invoice is considered to be "confirmed" after 1 block confirmation (~10 minutes). ● “low”: An invoice is considered to be "confirmed" after 6 block confirmations (~1 hour). NOTE: Orders are posted to your Account Summary after 6 block confirmations regardless of this setting.
public getTransactionSpeed ( ) : string
return string

getUrl() public method

An https URL where the invoice can be viewed.
public getUrl ( ) : string
return string

isFullNotifications() public method

● false: Notifications are only sent when an invoice is confirmed (according to the “transactionSpeed” setting).
public isFullNotifications ( ) : boolean
return boolean

isPhysical() public method

default value: false ● true: Indicates a physical item will be shipped (or picked up) ● false: Indicates that nothing is to be shipped for this order
Deprecation:
public isPhysical ( ) : boolean
return boolean