PHP Interface Bitpay\InvoiceInterface

Afficher le fichier Open project: bitpay/php-client Interface Usage Examples

Méthodes publiques

Méthode 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 méthode

public getBtcPaid ( )

getBtcPrice() public méthode

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
Résultat string

getBuyer() public méthode

public getBuyer ( ) : BuyerInterface
Résultat BuyerInterface

getBuyerAddress1() public méthode

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
Résultat string

getBuyerAddress2() public méthode

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
Résultat string

getBuyerCity() public méthode

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
Résultat string

getBuyerCountry() public méthode

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
Résultat string

getBuyerEmail() public méthode

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
Résultat string

getBuyerName() public méthode

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
Résultat string

getBuyerPhone() public méthode

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
Résultat string

getBuyerState() public méthode

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
Résultat string

getBuyerZip() public méthode

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
Résultat string

getCurrency() public méthode

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
Résultat bitpay\CurrencyInterface

getCurrentTime() public méthode

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
Résultat DateTime

getExceptionStatus() public méthode

public getExceptionStatus ( )

getExpirationTime() public méthode

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
Résultat DateTime

getId() public méthode

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

getInvoiceTime() public méthode

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
Résultat DateTime

getItem() public méthode

public getItem ( ) : bitpay\ItemInterface
Résultat bitpay\ItemInterface

getItemCode() public méthode

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

getItemDesc() public méthode

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

getNotificationEmail() public méthode

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

getNotificationUrl() public méthode

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
Résultat string

getOrderId() public méthode

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
Résultat string

getPosData() public méthode

Maximum string length is 100 characters.
public getPosData ( ) : array | object
Résultat array | object

getPrice() public méthode

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
Résultat string

getRate() public méthode

public getRate ( )

getRedirectUrl() public méthode

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
Résultat string

getStatus() public méthode

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

getToken() public méthode

public getToken ( )

getTransactionSpeed() public méthode

● “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
Résultat string

getUrl() public méthode

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

isFullNotifications() public méthode

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

isPhysical() public méthode

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
Résultat boolean