프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$success | Boolean variable to check if the API call was a success |
메소드 | 설명 | |
---|---|---|
__construct ( $config = null ) | * Takes user configuration array from the user as input Takes JSON file path with configuration information as input Validates the user configuration array against existing config array | |
__get ( $name ) | * Getter Gets the value for the key if the key exists in config | |
authorize ( $requestParameters = [] ) | * Authorize API call - Reserves a specified amount against the payment method(s) stored in the order reference. | |
authorizeOnBillingAgreement ( $requestParameters = [] ) | * AuthorizeOnBillingAgreement API call - Reserves a specified amount against the payment method(s) stored in the Billing Agreement. | |
cancelOrderReference ( $requestParameters = [] ) | * CancelOrderReferenceDetails API call - Cancels a previously confirmed order reference. | |
capture ( $requestParameters = [] ) | * Capture API call - Captures funds from an authorized payment instrument. | |
charge ( $requestParameters = [] ) | * charge convenience method Performs the API calls 1. SetOrderReferenceDetails / SetBillingAgreementDetails 2. ConfirmOrderReference / ConfirmBillingAgreement 3. Authorize (with Capture) / AuthorizeOnBillingAgreeemnt (with Capture) | |
closeAuthorization ( $requestParameters = [] ) | * CloseAuthorization API call - Closes an authorization. | |
closeBillingAgreement ( $requestParameters = [] ) | * CloseBillingAgreement API Call - Returns details about the Billing Agreement object and its current state. | |
closeOrderReference ( $requestParameters = [] ) | * CloseOrderReferenceDetails API call - Confirms that an order reference has been fulfilled (fully or partially) and that you do not expect to create any new authorizations on this order reference. | |
confirmBillingAgreement ( $requestParameters = [] ) | * ConfirmBillingAgreement API Call - Confirms that the Billing Agreement is free of constraints and all required information has been set on the Billing Agreement. | |
confirmOrderReference ( $requestParameters = [] ) | * ConfirmOrderReferenceDetails API call - Confirms that the order reference is free of constraints and all required information has been set on the order reference. | |
createOrderReferenceForId ( $requestParameters = [] ) | * CreateOrderReferenceForId API Call - Creates an order reference for the given object | |
getAuthorizationDetails ( $requestParameters = [] ) | * GetAuthorizationDetails API call - Returns the status of a particular authorization and the total amount captured on the authorization. | |
getBillingAgreementDetails ( $requestParameters = [] ) | * GetBillingAgreementDetails API Call - Returns details about the Billing Agreement object and its current state. | |
getCaptureDetails ( $requestParameters = [] ) | * GetCaptureDetails API call - Returns the status of a particular capture and the total amount refunded on the capture. | |
getOrderReferenceDetails ( $requestParameters = [] ) | * GetOrderReferenceDetails API call - Returns details about the Order Reference object and its current state. | |
getParameters ( ) | * Getter for parameters string Gets the value for the parameters string for unit testing | |
getProviderCreditDetails ( $requestParameters = [] ) | * GetProviderCreditDetails API Call - Get the details of the Provider Credit. | |
getProviderCreditReversalDetails ( $requestParameters = [] ) | * GetProviderCreditReversalDetails API Call - Get details of the Provider Credit Reversal. | |
getRefundDetails ( $requestParameters = [] ) | * GetRefundDetails API call - Returns the status of a particular refund. | |
getServiceStatus ( $requestParameters = [] ) | * GetServiceStatus API Call - Returns the operational status of the Off-Amazon Payments API section | |
getSignature ( $stringToSign, $secretKey ) | * Computes RFC 2104-compliant HMAC signature | |
getUserInfo ( $accessToken ) | * GetUserInfo convenience function - Returns user's profile information from Amazon using the access token returned by the Button widget. | |
refund ( $requestParameters = [] ) | * Refund API call - Refunds a previously captured amount. | |
reverseProviderCredit ( $requestParameters = [] ) | * ReverseProviderCredit API Call - Reverse the Provider Credit. | |
setBillingAgreementDetails ( $requestParameters = [] ) | * SetBillingAgreementDetails API call - Sets Billing Agreement details such as a description of the agreement and other information about the seller. | |
setClientId ( $value ) | * Setter for config['client_id'] Sets the value for config['client_id'] variable | |
setLogger ( Psr\Log\LoggerInterface $logger = null ) | ||
setMwsServiceUrl ( $url ) | * Setter for $mwsServiceUrl Set the URL to which the post request has to be made for unit testing | |
setOrderReferenceDetails ( $requestParameters = [] ) | * SetOrderReferenceDetails API call - Sets order reference details such as the order total and a description for the order. | |
setProxy ( $proxy ) | * Setter for Proxy input $proxy [array] | |
setSandbox ( $value ) | * Setter for sandbox Sets the Boolean value for config['sandbox'] variable | |
validateBillingAgreement ( $requestParameters = [] ) | * ValidateBillignAgreement API Call - Validates the status of the Billing Agreement object and the payment method associated with it. |
메소드 | 설명 | |
---|---|---|
calculateSignatureAndParametersToString ( $parameters = [] ) | * Create an Array of required parameters, sort them Calculate signature and invoke the POST to the MWS Service URL | |
calculateSignatureAndPost ( $parameters ) | * calculateSignatureAndPost - convert the Parameters array to string and curl POST the parameters to MWS | |
calculateStringToSignV2 ( array $parameters ) | * Calculate String to Sign for SignatureVersion 2 | |
checkConfigKeys ( $config ) | * Checks if the keys of the input configuration matches the keys in the config array if they match the values are taken else throws exception strict case match is not performed | |
checkIfBool ( $string ) | * checkIfBool - checks if the input is a boolean | |
checkIfFileExists ( $config ) | * checkIfFileExists - check if the JSON file exists in the path provided | |
constructUserAgentHeader ( ) | * Create the User Agent Header sent with the POST request | |
createServiceUrl ( ) | * Create MWS service URL and the Endpoint path | |
getErrorMessageForJsonError ( $jsonError ) | * Convert a json error code to a descriptive error message | |
getFormattedTimestamp ( ) | * Formats date as ISO 8601 timestamp | |
getParametersAsString ( array $parameters ) | * Convert paremeters to Url encoded query string | |
getRegionUrls ( ) | * Get the Region specific properties from the Regions class. | |
invokePost ( $parameters ) | * invokePost takes the parameters and invokes the httpPost function to POST the parameters Exponential retries on error 500 and 503 The response from the POST is an XML which is converted to Array | |
logMessage ( $message ) | * Helper function to log data within the Client | |
makeChargeCalls ( $chargeType, $setParameters, $confirmParameters, $authorizeParameters ) | * makeChargeCalls - makes API calls based off the charge type (OrderReference or BillingAgreement) | |
pauseOnRetry ( $retries, $status ) | * Exponential sleep on failed request | |
profileEndpointUrl ( ) | * Based on the config['region'] and config['sandbox'] values get the user profile URL | |
quoteApplicationName ( $s ) | * Collapse multiple whitespace characters into a single ' ' and backslash escape '\', and '/' characters from a string. | |
quoteApplicationVersion ( $s ) | * Collapse multiple whitespace characters into a single ' ' and backslash escape '\', and '(' characters from a string. | |
sanitizeRequestData ( $input ) | ||
sanitizeResponseData ( $input ) | ||
setDefaultValues ( $parameters, $fieldMappings, $requestParameters ) | * If merchant_id is not set via the requestParameters array then it's taken from the config array | |
setParametersAndPost ( $parameters, $fieldMappings, $requestParameters ) | * setParametersAndPost - sets the parameters array with non empty values from the requestParameters array sent to API calls. | |
setProviderCreditDetails ( $parameters, $providerCreditInfo ) | * setProviderCreditDetails - sets the provider credit details sent via the Capture or Authorize API calls | |
setProviderCreditReversalDetails ( $parameters, $providerCreditInfo ) | * setProviderCreditReversalDetails - sets the reverse provider credit details sent via the Refund API call. | |
sign ( $data, $algorithm ) | * Computes RFC 2104-compliant HMAC signature | |
signParameters ( array $parameters ) | * Computes RFC 2104-compliant HMAC signature for request parameters Implements AWS Signature, as per following spec: | |
trimArray ( $array ) | * Trim the input Array key values | |
urlEncode ( $value ) |
public __construct ( $config = null ) |
public __get ( $name ) |
public authorize ( $requestParameters = [] ) |
public authorizeOnBillingAgreement ( $requestParameters = [] ) |
public cancelOrderReference ( $requestParameters = [] ) |
public capture ( $requestParameters = [] ) |
public charge ( $requestParameters = [] ) |
public closeAuthorization ( $requestParameters = [] ) |
public closeBillingAgreement ( $requestParameters = [] ) |
public closeOrderReference ( $requestParameters = [] ) |
public confirmBillingAgreement ( $requestParameters = [] ) |
public confirmOrderReference ( $requestParameters = [] ) |
public createOrderReferenceForId ( $requestParameters = [] ) |
public getAuthorizationDetails ( $requestParameters = [] ) |
public getBillingAgreementDetails ( $requestParameters = [] ) |
public getCaptureDetails ( $requestParameters = [] ) |
public getOrderReferenceDetails ( $requestParameters = [] ) |
public getParameters ( ) |
public getProviderCreditDetails ( $requestParameters = [] ) |
public getProviderCreditReversalDetails ( $requestParameters = [] ) |
public getRefundDetails ( $requestParameters = [] ) |
public getServiceStatus ( $requestParameters = [] ) |
public static getSignature ( $stringToSign, $secretKey ) |
public getUserInfo ( $accessToken ) | ||
$accessToken | [String] |
public refund ( $requestParameters = [] ) |
public reverseProviderCredit ( $requestParameters = [] ) |
public setBillingAgreementDetails ( $requestParameters = [] ) |
public setClientId ( $value ) |
public setLogger ( Psr\Log\LoggerInterface $logger = null ) | ||
$logger | Psr\Log\LoggerInterface |
public setMwsServiceUrl ( $url ) |
public setOrderReferenceDetails ( $requestParameters = [] ) |
public setSandbox ( $value ) |
public validateBillingAgreement ( $requestParameters = [] ) |