From f3838ca9fa04e7364af3e56036e91ccc3e9c8303 Mon Sep 17 00:00:00 2001 From: Gopal Shimpi Date: Tue, 19 Dec 2017 16:29:06 +0530 Subject: [PATCH 01/17] @spec & basic docs are added. --- doc/Kuber.Hex.CreditCard.html | 2 +- doc/Kuber.Hex.Gateways.Cams.html | 186 ++++++++------- doc/Kuber.Hex.Response.html | 8 + doc/api-reference.html | 4 + lib/kuber_hex/gateways/cams.ex | 379 ++++++++++++++++++------------- 5 files changed, 331 insertions(+), 248 deletions(-) diff --git a/doc/Kuber.Hex.CreditCard.html b/doc/Kuber.Hex.CreditCard.html index 4ae253fd..e101a9e6 100644 --- a/doc/Kuber.Hex.CreditCard.html +++ b/doc/Kuber.Hex.CreditCard.html @@ -73,7 +73,7 @@

CreditCard module defines the struct for the credit cards.

-

It mostly has fields such as:-

+

It mostly has such as:-

  • number: Credit card number
  • diff --git a/doc/Kuber.Hex.Gateways.Cams.html b/doc/Kuber.Hex.Gateways.Cams.html index fa93ec37..dc7fcd3f 100644 --- a/doc/Kuber.Hex.Gateways.Cams.html +++ b/doc/Kuber.Hex.Gateways.Cams.html @@ -71,6 +71,28 @@

    +
    +

    An API client for the CAMS gateway. + For referance you can test gateway operations [CAMS API SANDBOX] (https://secure.centralams.com).

    +

    Test it using test crediantials username:”testintegrationc”, password:”password9”

    +

    The following features of CAMS are implemented:

    + + +
    +
    @@ -93,6 +115,14 @@

    authorize(money, payment, options) +

    authorize method responsible for authorize the credit card with specified amount. + Authorize method authorize the transaction but does not trasnfer the funds. + After authorize we need to call capture method for complete the transaction(fund transfer). + After successful authorisation it returns response containing authcode & transactionid. + auth_code and transactionid is required for capturing specified amount for particular transaction. + After successful transaction it returns response with authcode & transactionid

    +
    +
    +

    An authorized transaction need to be captured to compelete the transaction

    +
    +
    -

    payment = %CreditCard{

    -
      number: "4111111111111111",
    -  month: 11,
    -  year: 2018,
    -  first_name: "Longbob",
    -  last_name: "Longsen",
    -  verification_code: "123",
    -  brand: "visa"
    -}
    -credit_card = %CreditCard{
    -  number: "4242424242424242",
    -  month: 11,
    -  year: 2018,
    -  first_name: "Longbob",
    -  last_name: "Longsen",
    -  verification_code: "123",
    -  brand: "visa"
    -}
    -address = %{
    -  name:     "Jim Smith",
    -  address1: "456 My Street",
    -  address2: "Apt 1",
    -  company:  "Widgets Inc",
    -  city:     "Ottawa",
    -  state:    "ON",
    -  zip:      "K1C2N6",
    -  country:  "CA",
    -  phone:    "(555)555-5555",
    -  fax:      "(555)555-6666"
    -}
    -options = [
    -  config: %{
    -            username: "testintegrationc",
    -            password: "password9"
    -          },
    -  order_id: 1,
    -  billing_address: address,
    -  description: "Store Purchase",
    -]
    +

    Purchase method responsible for sale operation. + After successfull transaction it returns response containing authcode & transactionid

    @@ -158,6 +154,10 @@

    refund(money, authorization, options)

    +

    Successful trasaction can be refunded after settlement or any time. +It require transactionid for refund the specified amount back to creditcard holder

    +
    +
    @@ -185,12 +185,20 @@

    verify(credit_card, options)

    +

    This mehthod is for only verification purpose for credit card. +Here we need to provide CreditCard info

    +
    +
    +

    Transaction can be cancled only before settlement. +It require transactionid for cancel the transaction

    +
    +
    @@ -224,9 +232,21 @@

    +
    + +
    authorize(number(), Kuber.Hex.CreditCard, Keyword) :: Kuber.Hex.Response
    + +
    +
    - +

    authorize method responsible for authorize the credit card with specified amount. + Authorize method authorize the transaction but does not trasnfer the funds. + After authorize we need to call capture method for complete the transaction(fund transfer). + After successful authorisation it returns response containing authcode & transactionid. + auth_code and transactionid is required for capturing specified amount for particular transaction. + After successful transaction it returns response with authcode & transactionid

    +
    @@ -258,9 +278,16 @@

    +
    + +
    capture(number(), String.t(), Keyword) :: Kuber.Hex.Response
    + +
    +

    - +

    An authorized transaction need to be captured to compelete the transaction.

    +
    @@ -275,47 +302,16 @@

    +
    + +
    purchase(number(), Kuber.Hex.CreditCard, Keyword) :: Kuber.Hex.Response
    + +
    +

    -
      payment = %CreditCard{
    -  number: "4111111111111111",
    -  month: 11,
    -  year: 2018,
    -  first_name: "Longbob",
    -  last_name: "Longsen",
    -  verification_code: "123",
    -  brand: "visa"
    -}
    -credit_card = %CreditCard{
    -  number: "4242424242424242",
    -  month: 11,
    -  year: 2018,
    -  first_name: "Longbob",
    -  last_name: "Longsen",
    -  verification_code: "123",
    -  brand: "visa"
    -}
    -address = %{
    -  name:     "Jim Smith",
    -  address1: "456 My Street",
    -  address2: "Apt 1",
    -  company:  "Widgets Inc",
    -  city:     "Ottawa",
    -  state:    "ON",
    -  zip:      "K1C2N6",
    -  country:  "CA",
    -  phone:    "(555)555-5555",
    -  fax:      "(555)555-6666"
    -}
    -options = [
    -  config: %{
    -            username: "testintegrationc",
    -            password: "password9"
    -          },
    -  order_id: 1,
    -  billing_address: address,
    -  description: "Store Purchase",
    -]
    +

    Purchase method responsible for sale operation. + After successfull transaction it returns response containing authcode & transactionid

    @@ -331,9 +327,17 @@

    +
    + +
    refund(number(), String.t(), Keyword) :: Kuber.Hex.Response
    + +
    +
    - +

    Successful trasaction can be refunded after settlement or any time. +It require transactionid for refund the specified amount back to creditcard holder.

    +
    @@ -400,9 +404,17 @@

    +
    + +
    verify(Kuber.Hex.CreditCard, Keyword) :: Kuber.Hex.Response
    + +
    +

    - +

    This mehthod is for only verification purpose for credit card. +Here we need to provide CreditCard info.

    +
    @@ -417,9 +429,17 @@

    +
    + +
    void(String.t(), Keyword) :: Kuber.Hex.Response
    + +
    +

    - +

    Transaction can be cancled only before settlement. +It require transactionid for cancel the transaction.

    +
    diff --git a/doc/Kuber.Hex.Response.html b/doc/Kuber.Hex.Response.html index 1a7685b9..16837ee6 100644 --- a/doc/Kuber.Hex.Response.html +++ b/doc/Kuber.Hex.Response.html @@ -75,6 +75,14 @@

    Module which defines the struct for response struct.

    Response struct is a standard response from public API to the application.

    TODO: Add the response struct detail about the attributes in the struct

    +

    It mostly has such as:-

    +
    * `success`: boolean indicating the status of the transaction
    +* `authorization`: token which is used to issue requests without the card info
    +* `code`: status code for the response
    +* `reason`: reason for the error if it happens
    +* `avs_result`: TODO: add this
    +* `cvc_result`: result for cvc verification 
    +* `raw`: TODO: add this

    diff --git a/doc/api-reference.html b/doc/api-reference.html index 7266bbd7..541f809c 100644 --- a/doc/api-reference.html +++ b/doc/api-reference.html @@ -125,6 +125,10 @@

    +

    An API client for the CAMS gateway. + For referance you can test gateway operations [CAMS API SANDBOX] (https://secure.centralams.com)

    +
    +
    diff --git a/lib/kuber_hex/gateways/cams.ex b/lib/kuber_hex/gateways/cams.ex index 260bb0f2..25e381a2 100644 --- a/lib/kuber_hex/gateways/cams.ex +++ b/lib/kuber_hex/gateways/cams.ex @@ -1,174 +1,225 @@ defmodule Kuber.Hex.Gateways.Cams do - @live_url "https://secure.centralams.com/gw/api/transact.php" - @supported_countries ["US"] - @default_currency "USD" - @supported_cardtypes [:visa, :master, :american_express, :discover] - @homepage_url "https://www.centralams.com/" - @display_name "CAMS: Central Account Management System" - @headers [{"Content-Type", "application/x-www-form-urlencoded"}] - + @live_url "https://secure.centralams.com/gw/api/transact.php" + @supported_countries ["US"] + @default_currency "USD" + @money_format "cents" + @supported_cardtypes [:visa, :master, :american_express, :discover] + @homepage_url "https://www.centralams.com/" + @display_name "CAMS: Central Account Management System" + @headers [{"Content-Type", "application/x-www-form-urlencoded"}] - use Kuber.Hex.Gateways.Base - use Kuber.Hex.Adapter, required_config: [:username, :password, :default_currency] - alias Kuber.Hex.{ - CreditCard, - Address, - Response - } - @doc """ - payment = %CreditCard{ - number: "4111111111111111", - month: 11, - year: 2018, - first_name: "Longbob", - last_name: "Longsen", - verification_code: "123", - brand: "visa" - } - credit_card = %CreditCard{ - number: "4242424242424242", - month: 11, - year: 2018, - first_name: "Longbob", - last_name: "Longsen", - verification_code: "123", - brand: "visa" - } - address = %{ - name: "Jim Smith", - address1: "456 My Street", - address2: "Apt 1", - company: "Widgets Inc", - city: "Ottawa", - state: "ON", - zip: "K1C2N6", - country: "CA", - phone: "(555)555-5555", - fax: "(555)555-6666" - } - options = [ - config: %{ - username: "testintegrationc", - password: "password9" - }, - order_id: 1, - billing_address: address, - description: "Store Purchase", - ] - """ - import Poison, only: [decode!: 1] - - def purchase(money, payment, options) do - #consider this as creditcard payment only for now. - post = [] - |> add_invoice(money, options) - |> add_payment(payment) - |> add_address(payment, options) - commit("sale", post, options) - end - - def authorize(money, payment, options) do - post = [] - |> add_invoice(money, options) - |> add_payment(payment) - |> add_address(payment, options) - commit("auth", post, options) - end - - def capture(money, authorization, options) do - post = [] - |> extract_auth(authorization) - |> add_invoice(money,options) - commit("capture", post, options) - end - - def refund(money, authorization, options) do - post = [] - |> extract_auth(authorization) - |> add_invoice(money, options) - commit("refund", post, options) - end - - def void(authorization , options) do - post = extract_auth([], authorization) - commit("void", post, options) - end +@moduledoc ~S""" + An API client for the [CAMS](https://www.centralams.com/) gateway. + For referance you can test gateway operations [CAMS API SANDBOX] (https://secure.centralams.com). - def verify(credit_card, options) do - post = [] - |> add_invoice( 0, options) - |> add_payment(credit_card) - |> add_address(credit_card, options) - commit("verify", post, options) - end - - # private methods - - defp add_invoice(post, money, options) do - post - |> Keyword.put(:amount, money) - |> Keyword.put(:currency,(options[:currency] || @default_currency)) - end - - defp add_payment(post, payment) do - exp_month = join_month(payment) - exp_year = payment.year - |> to_string() - |> String.slice(-2..-1) - post - |> Keyword.put(:ccnumber, payment.number) - |> Keyword.put(:ccexp, "#{exp_month}#{exp_year}") - |> Keyword.put(:cvv, payment.verification_code) - end - - defp add_address(post, payment, options) do - post - |> Keyword.put(:firstname, payment.first_name) - |> Keyword.put(:lastname, payment.last_name) - - if(options[:billing_address]) do - address = options[:billing_address] - post - |> Keyword.put(:address1 , address[:address1]) - |> Keyword.put(:address2, address[:address2]) - |> Keyword.put(:city, address[:city]) - |> Keyword.put(:state, address[:state]) - |> Keyword.put(:zip, address[:zip]) - |> Keyword.put(:country, address[:country]) - |> Keyword.put(:phone, address[:phone]) - end - end + Test it using test crediantials username:"testintegrationc", password:"password9" + + The following features of CAMS are implemented: + + * **Purchase** In `purchase/3` + + * **Authorize** In `authorize/3` + + * **Capture** In `capture/3` + + * **Refund** In `refund/3` + + * **Void** In `void/2` - defp join_month(payment) do - payment.month - |> to_string - |> String.pad_leading(2,"0") - end + * **Verify** In `verify/2` +""" + use Kuber.Hex.Gateways.Base + use Kuber.Hex.Adapter, required_config: [:username, :password, :default_currency] + alias Kuber.Hex.{ + CreditCard, + Address, + Response + } + # @doc """ + # payment = %CreditCard{ + # number: "4111111111111111", + # month: 11, + # year: 2018, + # first_name: "Longbob", + # last_name: "Longsen", + # verification_code: "123", + # brand: "visa" + # } + # credit_card = %CreditCard{ + # number: "4242424242424242", + # month: 11, + # year: 2018, + # first_name: "Longbob", + # last_name: "Longsen", + # verification_code: "123", + # brand: "visa" + # } + # address = %{ + # name: "Jim Smith", + # address1: "456 My Street", + # address2: "Apt 1", + # company: "Widgets Inc", + # city: "Ottawa", + # state: "ON", + # zip: "K1C2N6", + # country: "CA", + # phone: "(555)555-5555", + # fax: "(555)555-6666" + # } + # options = [ + # config: %{ + # username: "testintegrationc", + # password: "password9" + # }, + # order_id: 1, + # billing_address: address, + # description: "Store Purchase", + # ] + # """ + import Poison, only: [decode!: 1] + + @doc """ + Purchase method responsible for sale operation. + After successfull transaction it returns response containing authcode & transactionid + """ + @spec purchase(number, CreditCard, Keyword) :: Response + def purchase(money, payment, options) do + post = [] + |> add_invoice(money, options) + |> add_payment(payment) + |> add_address(payment, options) + commit("sale", post, options) + end + + @doc """ + authorize method responsible for authorize the credit card with specified amount. + Authorize method authorize the transaction but does not trasnfer the funds. + After authorize we need to call capture method for complete the transaction(fund transfer). + After successful authorisation it returns response containing authcode & transactionid. + *auth_code* and *transactionid* is required for capturing specified amount for particular transaction. + After successful transaction it returns response with authcode & transactionid + """ + @spec authorize(number, CreditCard, Keyword) :: Response + def authorize(money, payment, options) do + post = [] + |> add_invoice(money, options) + |> add_payment(payment) + |> add_address(payment, options) + commit("auth", post, options) + end - defp commit(action, params, options) do - url = @live_url - params = params - |> Keyword.put(:type, action) - |> Keyword.put(:password, options[:config][:password]) - |> Keyword.put(:username, options[:config][:username]) - |> params_to_string - - HTTPoison.post(url, params, @headers) - |>respond - end + @doc """ + An authorized transaction need to be captured to compelete the transaction. + """ + @spec capture(number, String.t, Keyword) :: Response + def capture(money, authorization, options) do + post = [] + |> extract_auth(authorization) + |> add_invoice(money,options) + commit("capture", post, options) + end + + @doc """ + Successful trasaction can be refunded after settlement or any time. + It require *transactionid* for refund the specified amount back to creditcard holder. + """ + @spec refund(number, String.t, Keyword) :: Response + def refund(money, authorization, options) do + post = [] + |> extract_auth(authorization) + |> add_invoice(money, options) + commit("refund", post, options) + end - defp respond({:ok, %{body: body, status_code: 200}}) do - {:ok, body} - end + @doc """ + Transaction can be cancled only before settlement. + It require *transactionid* for cancel the transaction. + """ + @spec void(String.t, Keyword) :: Response + def void(authorization , options) do + post = extract_auth([], authorization) + commit("void", post, options) + end + + @doc """ + This mehthod is for only verification purpose for credit card. + Here we need to provide CreditCard info. + """ + @spec verify(CreditCard, Keyword) :: Response + def verify(credit_card, options) do + post = [] + |> add_invoice( 0, options) + |> add_payment(credit_card) + |> add_address(credit_card, options) + commit("verify", post, options) + end + + # private methods - defp respond({:error, %HTTPoison.Error{reason: reason}}) do - { :error, "Some error has been occurred" } - end + defp add_invoice(post, money, options) do + post + |> Keyword.put(:amount, money) + |> Keyword.put(:currency,(options[:currency] || @default_currency)) + end - defp extract_auth(post,authorization) do - response_body = URI.decode_query(authorization) - Keyword.put([],:transactionid,String.to_integer(response_body["transactionid"])) - |> Keyword.put(:authcode, String.to_integer(response_body["authcode"])) + defp add_payment(post, payment) do + exp_month = join_month(payment) + exp_year = payment.year + |> to_string() + |> String.slice(-2..-1) + post + |> Keyword.put(:ccnumber, payment.number) + |> Keyword.put(:ccexp, "#{exp_month}#{exp_year}") + |> Keyword.put(:cvv, payment.verification_code) + end + + defp add_address(post, payment, options) do + post + |> Keyword.put(:firstname, payment.first_name) + |> Keyword.put(:lastname, payment.last_name) + + if(options[:billing_address]) do + address = options[:billing_address] + post + |> Keyword.put(:address1 , address[:address1]) + |> Keyword.put(:address2, address[:address2]) + |> Keyword.put(:city, address[:city]) + |> Keyword.put(:state, address[:state]) + |> Keyword.put(:zip, address[:zip]) + |> Keyword.put(:country, address[:country]) + |> Keyword.put(:phone, address[:phone]) end end - \ No newline at end of file + + defp join_month(payment) do + payment.month + |> to_string + |> String.pad_leading(2,"0") + end + + defp commit(action, params, options) do + url = @live_url + params = params + |> Keyword.put(:type, action) + |> Keyword.put(:password, options[:config][:password]) + |> Keyword.put(:username, options[:config][:username]) + |> params_to_string + + HTTPoison.post(url, params, @headers) + |>respond + end + + defp respond({:ok, %{body: body, status_code: 200}}) do + {:ok, body} + end + + defp respond({:error, %HTTPoison.Error{reason: reason}}) do + { :error, "Some error has been occurred" } + end + + defp extract_auth(post,authorization) do + response_body = URI.decode_query(authorization) + Keyword.put([],:transactionid,String.to_integer(response_body["transactionid"])) + |> Keyword.put(:authcode, String.to_integer(response_body["authcode"])) + end +end From d09452e4c11f47031bed8717397df88517092510 Mon Sep 17 00:00:00 2001 From: Gopal Shimpi Date: Tue, 19 Dec 2017 20:34:05 +0530 Subject: [PATCH 02/17] Completed docs for 1.Authorize 2. Purchase 3.Capture methods --- doc/Kuber.Hex.Gateways.Cams.html | 42 +++++++++++++++++--------------- lib/kuber_hex/gateways/cams.ex | 40 +++++++++++++++++++++--------- 2 files changed, 51 insertions(+), 31 deletions(-) diff --git a/doc/Kuber.Hex.Gateways.Cams.html b/doc/Kuber.Hex.Gateways.Cams.html index dc7fcd3f..af3b836b 100644 --- a/doc/Kuber.Hex.Gateways.Cams.html +++ b/doc/Kuber.Hex.Gateways.Cams.html @@ -74,7 +74,7 @@

    An API client for the CAMS gateway. For referance you can test gateway operations [CAMS API SANDBOX] (https://secure.centralams.com).

    -

    Test it using test crediantials username:”testintegrationc”, password:”password9”

    +

    Test it using test crediantials username:testintegrationc, password:password9

    The following features of CAMS are implemented:

    -

    authorize method responsible for authorize the credit card with specified amount. - Authorize method authorize the transaction but does not trasnfer the funds. - After authorize we need to call capture method for complete the transaction(fund transfer). - After successful authorisation it returns response containing authcode & transactionid. - auth_code and transactionid is required for capturing specified amount for particular transaction. - After successful transaction it returns response with authcode & transactionid

    +

    Use this method for authorising the credit card for particular transaction

    @@ -135,7 +130,7 @@

    capture(money, authorization, options) -

    An authorized transaction need to be captured to compelete the transaction

    +

    Use this method for capture the amount of the authorised transaction which is previously authorised by authorize/3 method

    @@ -144,8 +139,7 @@

    purchase(money, payment, options) -

    Purchase method responsible for sale operation. - After successfull transaction it returns response containing authcode & transactionid

    +

    Use this method for performing purchase(sale) operation

    @@ -240,12 +234,15 @@

    -

    authorize method responsible for authorize the credit card with specified amount. - Authorize method authorize the transaction but does not trasnfer the funds. - After authorize we need to call capture method for complete the transaction(fund transfer). - After successful authorisation it returns response containing authcode & transactionid. - auth_code and transactionid is required for capturing specified amount for particular transaction. - After successful transaction it returns response with authcode & transactionid

    +

    Use this method for authorising the credit card for particular transaction.

    +

    authorize/3 method only authorise the transaction,it does not transfer the funds. + After authorised a transaction, we need to call capture/3 method to complete the transaction. + After successful authorisation it returns response containing authcode and transactionid. + We required authcode,transactionid and money for capturing transaction later on. + It perform operation by taking money, payment (credit card details) & options as parameters. + Here money is required field which contains amount to be deducted. + Required fields in credit card are Credit Card Number & Expiration Date. + Whereas options contains other information like billing address,order information etc.

    @@ -286,7 +283,10 @@

    -

    An authorized transaction need to be captured to compelete the transaction.

    +

    Use this method for capture the amount of the authorised transaction which is previously authorised by authorize/3 method.

    +

    It take money, authorization and options as parameters. + Here money is a amount to be captured and authorization is a response returned by authorize/3 method. + Both money and authorization are required fields, whereas options are as same as authorize/3 and purchase/3 methods.

    @@ -310,8 +310,12 @@

    -

    Purchase method responsible for sale operation. - After successfull transaction it returns response containing authcode & transactionid

    +

    Use this method for performing purchase(sale) operation.

    +

    It perform operation by taking money, payment(credit card details) & options as parameters. + Here money is required field which contains amount to be deducted. + Required fields in credit card are Credit Card Number & Expiration Date. + Whereas options contains other information like billing address,order information etc. + After successful transaction it returns response containing authcode & transactionid.

    diff --git a/lib/kuber_hex/gateways/cams.ex b/lib/kuber_hex/gateways/cams.ex index 25e381a2..2debe31b 100644 --- a/lib/kuber_hex/gateways/cams.ex +++ b/lib/kuber_hex/gateways/cams.ex @@ -1,7 +1,7 @@ defmodule Kuber.Hex.Gateways.Cams do @live_url "https://secure.centralams.com/gw/api/transact.php" @supported_countries ["US"] - @default_currency "USD" + @default_currency ["USD","AUD"] @money_format "cents" @supported_cardtypes [:visa, :master, :american_express, :discover] @homepage_url "https://www.centralams.com/" @@ -12,7 +12,7 @@ defmodule Kuber.Hex.Gateways.Cams do An API client for the [CAMS](https://www.centralams.com/) gateway. For referance you can test gateway operations [CAMS API SANDBOX] (https://secure.centralams.com). - Test it using test crediantials username:"testintegrationc", password:"password9" + Test it using test crediantials username:***testintegrationc***, password:***password9*** The following features of CAMS are implemented: @@ -45,7 +45,7 @@ defmodule Kuber.Hex.Gateways.Cams do # verification_code: "123", # brand: "visa" # } - # credit_card = %CreditCard{ + # credit_card = %CreditCard{ # number: "4242424242424242", # month: 11, # year: 2018, @@ -79,8 +79,14 @@ defmodule Kuber.Hex.Gateways.Cams do import Poison, only: [decode!: 1] @doc """ - Purchase method responsible for sale operation. - After successfull transaction it returns response containing authcode & transactionid + Use this method for performing purchase(sale) operation. + + + It perform operation by taking `money`, `payment`(credit card details) & `options` as parameters. + Here `money` is required field which contains amount to be deducted. + Required fields in credit card are `Credit Card Number` & `Expiration Date`. + Whereas `options` contains other information like billing address,order information etc. + After successful transaction it returns response containing **authcode** & **transactionid**. """ @spec purchase(number, CreditCard, Keyword) :: Response def purchase(money, payment, options) do @@ -92,12 +98,17 @@ defmodule Kuber.Hex.Gateways.Cams do end @doc """ - authorize method responsible for authorize the credit card with specified amount. - Authorize method authorize the transaction but does not trasnfer the funds. - After authorize we need to call capture method for complete the transaction(fund transfer). - After successful authorisation it returns response containing authcode & transactionid. - *auth_code* and *transactionid* is required for capturing specified amount for particular transaction. - After successful transaction it returns response with authcode & transactionid + Use this method for authorising the credit card for particular transaction. + + + `authorize/3` method only authorise the transaction,it does not transfer the funds. + After authorised a transaction, we need to call `capture/3` method to complete the transaction. + After successful authorisation it returns response containing **authcode** and **transactionid**. + We required **authcode**,**transactionid** and **money** for capturing transaction later on. + It perform operation by taking `money`, `payment` (credit card details) & `options` as parameters. + Here `money` is required field which contains amount to be deducted. + Required fields in credit card are `Credit Card Number` & `Expiration Date`. + Whereas `options` contains other information like billing address,order information etc. """ @spec authorize(number, CreditCard, Keyword) :: Response def authorize(money, payment, options) do @@ -109,7 +120,12 @@ defmodule Kuber.Hex.Gateways.Cams do end @doc """ - An authorized transaction need to be captured to compelete the transaction. + Use this method for capture the amount of the authorised transaction which is previously authorised by `authorize/3` method. + + + It take `money`, `authorization` and `options` as parameters. + Here `money` is a amount to be captured and `authorization` is a response returned by `authorize/3` method. + Both *money* and *authorization* are required fields, whereas `options` are as same as `authorize/3` and `purchase/3` methods. """ @spec capture(number, String.t, Keyword) :: Response def capture(money, authorization, options) do From ae84d38df370142f9877f6ff91efb290919b8cb4 Mon Sep 17 00:00:00 2001 From: Gopal Shimpi Date: Wed, 20 Dec 2017 11:56:54 +0530 Subject: [PATCH 03/17] Completed docs upto refund method --- doc/Kuber.Hex.Gateways.Cams.html | 16 +++++++++++----- lib/kuber_hex/gateways/cams.ex | 15 ++++++++++++--- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/doc/Kuber.Hex.Gateways.Cams.html b/doc/Kuber.Hex.Gateways.Cams.html index af3b836b..920da002 100644 --- a/doc/Kuber.Hex.Gateways.Cams.html +++ b/doc/Kuber.Hex.Gateways.Cams.html @@ -148,8 +148,7 @@

    refund(money, authorization, options) -

    Successful trasaction can be refunded after settlement or any time. -It require transactionid for refund the specified amount back to creditcard holder

    +

    Use this method for refund the amount for particular transaction

    @@ -285,7 +284,8 @@

    Use this method for capture the amount of the authorised transaction which is previously authorised by authorize/3 method.

    It take money, authorization and options as parameters. - Here money is a amount to be captured and authorization is a response returned by authorize/3 method. + Where money is a amount to be captured and authorization is a response returned by authorize/3 method. + From response it takes authcode and transactionid for further processing. Both money and authorization are required fields, whereas options are as same as authorize/3 and purchase/3 methods.

    @@ -339,8 +339,14 @@

    -

    Successful trasaction can be refunded after settlement or any time. -It require transactionid for refund the specified amount back to creditcard holder.

    +

    Use this method for refund the amount for particular transaction.

    +

    Successful transaction can be refunded after settlement or any time. + It requires transactionid for refund the specified amount back to credit card holder. + Only purchased(sale) transactions can be refund based on thier transactionid. + It take money, authorization and options as parameters. + Where money is a amount to be refund and authorization is a response returned by purchase/3 method. + From response it takes authcode and transactionid for further processing. + Both money and authorization are required fields, whereas options are as same as authorize/3, purchase/3 and capture/3 methods.

    diff --git a/lib/kuber_hex/gateways/cams.ex b/lib/kuber_hex/gateways/cams.ex index 2debe31b..6d7304c6 100644 --- a/lib/kuber_hex/gateways/cams.ex +++ b/lib/kuber_hex/gateways/cams.ex @@ -124,7 +124,8 @@ defmodule Kuber.Hex.Gateways.Cams do It take `money`, `authorization` and `options` as parameters. - Here `money` is a amount to be captured and `authorization` is a response returned by `authorize/3` method. + Where `money` is a amount to be captured and `authorization` is a response returned by `authorize/3` method. + From response it takes `authcode` and `transactionid` for further processing. Both *money* and *authorization* are required fields, whereas `options` are as same as `authorize/3` and `purchase/3` methods. """ @spec capture(number, String.t, Keyword) :: Response @@ -136,8 +137,16 @@ defmodule Kuber.Hex.Gateways.Cams do end @doc """ - Successful trasaction can be refunded after settlement or any time. - It require *transactionid* for refund the specified amount back to creditcard holder. + Use this method for refund the amount for particular transaction. + + + Successful transaction can be refunded after settlement or any time. + It requires *transactionid* for refund the specified amount back to credit card holder. + Only purchased(sale) transactions can be refund based on thier `transactionid`. + It take `money`, `authorization` and `options` as parameters. + Where `money` is a amount to be refund and `authorization` is a response returned by `purchase/3` method. + From response it takes `authcode` and `transactionid` for further processing. + Both *money* and *authorization* are required fields, whereas `options` are as same as `authorize/3`, `purchase/3` and `capture/3` methods. """ @spec refund(number, String.t, Keyword) :: Response def refund(money, authorization, options) do From 6e46dc70c3408f65ec969a1a28744e27f4d83c87 Mon Sep 17 00:00:00 2001 From: Gopal Shimpi Date: Wed, 20 Dec 2017 12:17:21 +0530 Subject: [PATCH 04/17] delete docs --- doc/.build | 26 - doc/404.html | 98 ---- doc/Kuber.Hex.Adapter.html | 115 ---- doc/Kuber.Hex.Address.html | 106 ---- doc/Kuber.Hex.Application.html | 204 ------- doc/Kuber.Hex.CreditCard.html | 128 ----- doc/Kuber.Hex.Gateways.AuthorizeNet.html | 435 --------------- doc/Kuber.Hex.Gateways.Base.html | 106 ---- doc/Kuber.Hex.Gateways.Bogus.html | 301 ----------- doc/Kuber.Hex.Gateways.Cams.html | 484 ----------------- doc/Kuber.Hex.Gateways.Monei.html | 648 ----------------------- doc/Kuber.Hex.Gateways.Paymill.html | 466 ---------------- doc/Kuber.Hex.Gateways.Stripe.html | 556 ------------------- doc/Kuber.Hex.Gateways.WireCard.html | 613 --------------------- doc/Kuber.Hex.Response.html | 205 ------- doc/Kuber.Hex.Worker.html | 205 ------- doc/Kuber.Hex.html | 557 ------------------- doc/api-reference.html | 205 ------- doc/dist/app-778c9ef903.js | 8 - doc/dist/app-c922dbe7ef.css | 1 - doc/dist/sidebar_items-a31106edb0.js | 1 - doc/fonts/icomoon.eot | Bin 2472 -> 0 bytes doc/fonts/icomoon.svg | 16 - doc/fonts/icomoon.ttf | Bin 2308 -> 0 bytes doc/fonts/icomoon.woff | Bin 2384 -> 0 bytes doc/index.html | 11 - doc/search.html | 93 ---- 27 files changed, 5588 deletions(-) delete mode 100644 doc/.build delete mode 100644 doc/404.html delete mode 100644 doc/Kuber.Hex.Adapter.html delete mode 100644 doc/Kuber.Hex.Address.html delete mode 100644 doc/Kuber.Hex.Application.html delete mode 100644 doc/Kuber.Hex.CreditCard.html delete mode 100644 doc/Kuber.Hex.Gateways.AuthorizeNet.html delete mode 100644 doc/Kuber.Hex.Gateways.Base.html delete mode 100644 doc/Kuber.Hex.Gateways.Bogus.html delete mode 100644 doc/Kuber.Hex.Gateways.Cams.html delete mode 100644 doc/Kuber.Hex.Gateways.Monei.html delete mode 100644 doc/Kuber.Hex.Gateways.Paymill.html delete mode 100644 doc/Kuber.Hex.Gateways.Stripe.html delete mode 100644 doc/Kuber.Hex.Gateways.WireCard.html delete mode 100644 doc/Kuber.Hex.Response.html delete mode 100644 doc/Kuber.Hex.Worker.html delete mode 100644 doc/Kuber.Hex.html delete mode 100644 doc/api-reference.html delete mode 100644 doc/dist/app-778c9ef903.js delete mode 100644 doc/dist/app-c922dbe7ef.css delete mode 100644 doc/dist/sidebar_items-a31106edb0.js delete mode 100644 doc/fonts/icomoon.eot delete mode 100644 doc/fonts/icomoon.svg delete mode 100644 doc/fonts/icomoon.ttf delete mode 100644 doc/fonts/icomoon.woff delete mode 100644 doc/index.html delete mode 100644 doc/search.html diff --git a/doc/.build b/doc/.build deleted file mode 100644 index 49bc3f5a..00000000 --- a/doc/.build +++ /dev/null @@ -1,26 +0,0 @@ -dist/app-778c9ef903.js -dist/app-c922dbe7ef.css -fonts/icomoon.eot -fonts/icomoon.svg -fonts/icomoon.ttf -fonts/icomoon.woff -dist/sidebar_items-a31106edb0.js -api-reference.html -search.html -404.html -Kuber.Hex.html -Kuber.Hex.Adapter.html -Kuber.Hex.Address.html -Kuber.Hex.Application.html -Kuber.Hex.CreditCard.html -Kuber.Hex.Gateways.AuthorizeNet.html -Kuber.Hex.Gateways.Base.html -Kuber.Hex.Gateways.Bogus.html -Kuber.Hex.Gateways.Cams.html -Kuber.Hex.Gateways.Monei.html -Kuber.Hex.Gateways.Paymill.html -Kuber.Hex.Gateways.Stripe.html -Kuber.Hex.Gateways.WireCard.html -Kuber.Hex.Response.html -Kuber.Hex.Worker.html -index.html diff --git a/doc/404.html b/doc/404.html deleted file mode 100644 index fc3a6a31..00000000 --- a/doc/404.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - 404 – kuber_hex v0.0.2 - - - - - - - - - - - -
    - - - -
    -
    -
    - - -

    Page not found

    - -

    Sorry, but the page you were trying to get to, does not exist. You -may want to try searching this site using the sidebar or using our -API Reference page to find what -you were looking for.

    - - -
    -
    -
    -
    - - - - - - - - diff --git a/doc/Kuber.Hex.Adapter.html b/doc/Kuber.Hex.Adapter.html deleted file mode 100644 index 4c13d206..00000000 --- a/doc/Kuber.Hex.Adapter.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - Kuber.Hex.Adapter – kuber_hex v0.0.2 - - - - - - - - - - - -
    - - - -
    -
    -
    - - -

    - kuber_hex v0.0.2 - Kuber.Hex.Adapter - -

    - - -
    -

    Adapter module is currently holding the validation part.

    -

    This modules is being used by all the payment gateways and raises a run-time -error for the missing configurations which are passed by the gateways to -validate_config method.

    -

    Raises an exception ArgumentError if the config is not as per the @required_config

    - -
    - - - - - - - - - - -
    -
    -
    -
    - - - - - - - - diff --git a/doc/Kuber.Hex.Address.html b/doc/Kuber.Hex.Address.html deleted file mode 100644 index fab1bfe6..00000000 --- a/doc/Kuber.Hex.Address.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - Kuber.Hex.Address – kuber_hex v0.0.2 - - - - - - - - - - - -
    - - - -
    -
    -
    - - -

    - kuber_hex v0.0.2 - Kuber.Hex.Address - -

    - - - - - - - - - - - -
    -
    -
    -
    - - - - - - - - diff --git a/doc/Kuber.Hex.Application.html b/doc/Kuber.Hex.Application.html deleted file mode 100644 index 3aadb50f..00000000 --- a/doc/Kuber.Hex.Application.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - - Kuber.Hex.Application – kuber_hex v0.0.2 - - - - - - - - - - - -
    - - - -
    -
    -
    - - -

    - kuber_hex v0.0.2 - Kuber.Hex.Application - -

    - - -
    -

    Has the supervision tree which monitors all the workers -that are handling the payments.

    - -
    - - - -
    -

    - - - Link to this section - - Summary -

    - - - -
    -

    - Functions -

    -
    - - -

    Called when an application is started

    -
    - -
    - -
    - - - - -
    - - - - - -
    -

    - - - Link to this section - - Functions -

    -
    - - -
    - - - Link to this function - - start(type, args) - - - -
    -
    -

    Called when an application is started.

    -

    This function is called when an application is started using -Application.start/2 (and functions on top of that, such as -Application.ensure_started/2). This function should start the top-level -process of the application (which should be the top supervisor of the -application’s supervision tree if the application follows the OTP design -principles around supervision).

    -

    start_type defines how the application is started:

    -
      -
    • :normal - used if the startup is a normal startup or if the application -is distributed and is started on the current node because of a failover -from another node and the application specification key :start_phases -is :undefined. -
    • -
    • {:takeover, node} - used if the application is distributed and is -started on the current node because of a failover on the node node. -
    • -
    • {:failover, node} - used if the application is distributed and is -started on the current node because of a failover on node node, and the -application specification key :start_phases is not :undefined. -
    • -
    -

    start_args are the arguments passed to the application in the :mod -specification key (e.g., mod: {MyApp, [:my_args]}).

    -

    This function should either return {:ok, pid} or {:ok, pid, state} if -startup is successful. pid should be the PID of the top supervisor. state -can be an arbitrary term, and if omitted will default to []; if the -application is later stopped, state is passed to the stop/1 callback (see -the documentation for the c:stop/1 callback for more information).

    -

    use Application provides no default implementation for the start/2 -callback.

    -

    Callback implementation for Application.start/2.

    - -
    -
    - -
    - - - - -
    -
    -
    -
    - - - - - - - - diff --git a/doc/Kuber.Hex.CreditCard.html b/doc/Kuber.Hex.CreditCard.html deleted file mode 100644 index e101a9e6..00000000 --- a/doc/Kuber.Hex.CreditCard.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - Kuber.Hex.CreditCard – kuber_hex v0.0.2 - - - - - - - - - - - -
    - - - -
    -
    -
    - - -

    - kuber_hex v0.0.2 - Kuber.Hex.CreditCard - -

    - - -
    -

    CreditCard module defines the struct for the credit cards.

    -

    It mostly has such as:-

    -
      -
    • number: Credit card number -
    • -
    • month: Expiry month -
    • -
    • year: Expiration year -
    • -
    • first_name: First name of the card holder -
    • -
    • last_name: Last of the card holder -
    • -
    • verification_code: 3/4 digit code at the back of the card -
    • -
    • brand: VISA/MASTERCARD/MAESTRO/RUPAY etc. -
    • -
    - -
    - - - - - - - - - - -
    -
    -
    -
    - - - - - - - - diff --git a/doc/Kuber.Hex.Gateways.AuthorizeNet.html b/doc/Kuber.Hex.Gateways.AuthorizeNet.html deleted file mode 100644 index 75d992cf..00000000 --- a/doc/Kuber.Hex.Gateways.AuthorizeNet.html +++ /dev/null @@ -1,435 +0,0 @@ - - - - - - - - Kuber.Hex.Gateways.AuthorizeNet – kuber_hex v0.0.2 - - - - - - - - - - - -
    - - - -
    -
    -
    - - -

    - kuber_hex v0.0.2 - Kuber.Hex.Gateways.AuthorizeNet - -

    - - - - -
    -

    - - - Link to this section - - Summary -

    - - - -
    -

    - Functions -

    -
    - - -

    function to authorize the merchant using merchant name - and transactionKey

    -
    - -
    -
    - - -

    Use this method to authorize a card payment. To actually charge funds, a follow up with - capture method needs to be done

    -
    - -
    - -
    - - -

    Use this method to capture funds for transactions which have been authorized, - requires transId of the authorize function response to be passed as id along with - the amount to be captured

    -
    - -
    - -
    - - -

    Function to charge a user credit card for the specified amount, - according to the payment method provided(e.g. credit card, apple pay etc.)

    -
    - -
    -
    - - -

    Use this method to refund a customer for a transaction that was already settled

    -
    - -
    - - -
    - - -

    Validates the config dynamically depending on what is the value of required_config

    -
    - -
    -
    - - -

    Use this method to cancel either an original transaction that is not settled or - an entire order composed of more than one transaction. It can be submitted against - any other transaction type. Requires the transId of a request passed as id

    -
    - -
    - -
    - - - - -
    - - - - - -
    -

    - - - Link to this section - - Functions -

    -
    - - -
    - - - Link to this function - - authenticate(opts) - - - -
    -
    -

    function to authorize the merchant using merchant name - and transactionKey

    - -
    -
    -
    - - -
    - - - Link to this function - - authorize(amount, payment, opts) - - - -
    -
    -

    Use this method to authorize a card payment. To actually charge funds, a follow up with - capture method needs to be done.

    - -
    -
    -
    - - -
    - - - Link to this function - - capture(id, opts) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - capture(amount, id, opts) - - - -
    -
    -

    Use this method to capture funds for transactions which have been authorized, - requires transId of the authorize function response to be passed as id along with - the amount to be captured.

    - -
    -
    -
    - - -
    - - - Link to this function - - join_string(list, symbol) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - purchase(amount, payment, opts) - - - -
    -
    -

    Function to charge a user credit card for the specified amount, - according to the payment method provided(e.g. credit card, apple pay etc.)

    - -
    -
    -
    - - -
    - - - Link to this function - - refund(amount, id, opts) - - - -
    -
    -

    Use this method to refund a customer for a transaction that was already settled

    - -
    -
    -
    - - -
    - - - Link to this function - - store(card, opts) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - unstore(customer_id, card_id, opts) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - validate_config(config) - - - -
    -
    -

    Validates the config dynamically depending on what is the value of required_config

    - -
    -
    -
    - - -
    - - - Link to this function - - void(id, opts) - - - -
    -
    -

    Use this method to cancel either an original transaction that is not settled or - an entire order composed of more than one transaction. It can be submitted against - any other transaction type. Requires the transId of a request passed as id.

    - -
    -
    - -
    - - - - -
    -
    -
    -
    - - - - - - - - diff --git a/doc/Kuber.Hex.Gateways.Base.html b/doc/Kuber.Hex.Gateways.Base.html deleted file mode 100644 index 18b35b31..00000000 --- a/doc/Kuber.Hex.Gateways.Base.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - Kuber.Hex.Gateways.Base – kuber_hex v0.0.2 - - - - - - - - - - - -
    - - - -
    -
    -
    - - -

    - kuber_hex v0.0.2 - Kuber.Hex.Gateways.Base - -

    - - - - - - - - - - - -
    -
    -
    -
    - - - - - - - - diff --git a/doc/Kuber.Hex.Gateways.Bogus.html b/doc/Kuber.Hex.Gateways.Bogus.html deleted file mode 100644 index 61686382..00000000 --- a/doc/Kuber.Hex.Gateways.Bogus.html +++ /dev/null @@ -1,301 +0,0 @@ - - - - - - - - Kuber.Hex.Gateways.Bogus – kuber_hex v0.0.2 - - - - - - - - - - - -
    - - - -
    -
    -
    - - -

    - kuber_hex v0.0.2 - Kuber.Hex.Gateways.Bogus - -

    - - - - -
    -

    - - - Link to this section - - Summary -

    - - - - - - - - -
    - - - - - -
    -

    - - - Link to this section - - Functions -

    -
    - - -
    - - - Link to this function - - authorize(amount, card_or_id, opts) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - capture(id, opts) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - purchase(amount, card_or_id, opts) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - refund(amount, id, opts) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - store(card, opts) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - unstore(customer_id, card_id, opts) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - void(id, opts) - - - -
    -
    - -
    -
    - -
    - - - - -
    -
    -
    -
    - - - - - - - - diff --git a/doc/Kuber.Hex.Gateways.Cams.html b/doc/Kuber.Hex.Gateways.Cams.html deleted file mode 100644 index 920da002..00000000 --- a/doc/Kuber.Hex.Gateways.Cams.html +++ /dev/null @@ -1,484 +0,0 @@ - - - - - - - - Kuber.Hex.Gateways.Cams – kuber_hex v0.0.2 - - - - - - - - - - - -
    - - - -
    -
    -
    - - -

    - kuber_hex v0.0.2 - Kuber.Hex.Gateways.Cams - -

    - - -
    -

    An API client for the CAMS gateway. - For referance you can test gateway operations [CAMS API SANDBOX] (https://secure.centralams.com).

    -

    Test it using test crediantials username:testintegrationc, password:password9

    -

    The following features of CAMS are implemented:

    - - -
    - - - -
    -

    - - - Link to this section - - Summary -

    - - - -
    -

    - Functions -

    -
    - - -

    Use this method for authorising the credit card for particular transaction

    -
    - -
    - -
    - - -

    Use this method for capture the amount of the authorised transaction which is previously authorised by authorize/3 method

    -
    - -
    -
    - - -

    Use this method for performing purchase(sale) operation

    -
    - -
    -
    - - -

    Use this method for refund the amount for particular transaction

    -
    - -
    - - -
    - - -

    Validates the config dynamically depending on what is the value of required_config

    -
    - -
    -
    - - -

    This mehthod is for only verification purpose for credit card. -Here we need to provide CreditCard info

    -
    - -
    -
    - - -

    Transaction can be cancled only before settlement. -It require transactionid for cancel the transaction

    -
    - -
    - -
    - - - - -
    - - - - - -
    -

    - - - Link to this section - - Functions -

    -
    - - -
    - - - Link to this function - - authorize(money, payment, options) - - - -
    - -
    authorize(number(), Kuber.Hex.CreditCard, Keyword) :: Kuber.Hex.Response
    - -
    - -
    -
    -

    Use this method for authorising the credit card for particular transaction.

    -

    authorize/3 method only authorise the transaction,it does not transfer the funds. - After authorised a transaction, we need to call capture/3 method to complete the transaction. - After successful authorisation it returns response containing authcode and transactionid. - We required authcode,transactionid and money for capturing transaction later on. - It perform operation by taking money, payment (credit card details) & options as parameters. - Here money is required field which contains amount to be deducted. - Required fields in credit card are Credit Card Number & Expiration Date. - Whereas options contains other information like billing address,order information etc.

    - -
    -
    -
    - - -
    - - - Link to this function - - capture(id, opts) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - capture(money, authorization, options) - - - -
    - -
    capture(number(), String.t(), Keyword) :: Kuber.Hex.Response
    - -
    - -
    -
    -

    Use this method for capture the amount of the authorised transaction which is previously authorised by authorize/3 method.

    -

    It take money, authorization and options as parameters. - Where money is a amount to be captured and authorization is a response returned by authorize/3 method. - From response it takes authcode and transactionid for further processing. - Both money and authorization are required fields, whereas options are as same as authorize/3 and purchase/3 methods.

    - -
    -
    -
    - - -
    - - - Link to this function - - purchase(money, payment, options) - - - -
    - -
    purchase(number(), Kuber.Hex.CreditCard, Keyword) :: Kuber.Hex.Response
    - -
    - -
    -
    -

    Use this method for performing purchase(sale) operation.

    -

    It perform operation by taking money, payment(credit card details) & options as parameters. - Here money is required field which contains amount to be deducted. - Required fields in credit card are Credit Card Number & Expiration Date. - Whereas options contains other information like billing address,order information etc. - After successful transaction it returns response containing authcode & transactionid.

    - -
    -
    -
    - - -
    - - - Link to this function - - refund(money, authorization, options) - - - -
    - -
    refund(number(), String.t(), Keyword) :: Kuber.Hex.Response
    - -
    - -
    -
    -

    Use this method for refund the amount for particular transaction.

    -

    Successful transaction can be refunded after settlement or any time. - It requires transactionid for refund the specified amount back to credit card holder. - Only purchased(sale) transactions can be refund based on thier transactionid. - It take money, authorization and options as parameters. - Where money is a amount to be refund and authorization is a response returned by purchase/3 method. - From response it takes authcode and transactionid for further processing. - Both money and authorization are required fields, whereas options are as same as authorize/3, purchase/3 and capture/3 methods.

    - -
    -
    -
    - - -
    - - - Link to this function - - store(card, opts) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - unstore(customer_id, card_id, opts) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - validate_config(config) - - - -
    -
    -

    Validates the config dynamically depending on what is the value of required_config

    - -
    -
    -
    - - -
    - - - Link to this function - - verify(credit_card, options) - - - -
    - -
    verify(Kuber.Hex.CreditCard, Keyword) :: Kuber.Hex.Response
    - -
    - -
    -
    -

    This mehthod is for only verification purpose for credit card. -Here we need to provide CreditCard info.

    - -
    -
    -
    - - -
    - - - Link to this function - - void(authorization, options) - - - -
    - -
    void(String.t(), Keyword) :: Kuber.Hex.Response
    - -
    - -
    -
    -

    Transaction can be cancled only before settlement. -It require transactionid for cancel the transaction.

    - -
    -
    - -
    - - - - -
    -
    -
    -
    - - - - - - - - diff --git a/doc/Kuber.Hex.Gateways.Monei.html b/doc/Kuber.Hex.Gateways.Monei.html deleted file mode 100644 index fef35e93..00000000 --- a/doc/Kuber.Hex.Gateways.Monei.html +++ /dev/null @@ -1,648 +0,0 @@ - - - - - - - - Kuber.Hex.Gateways.Monei – kuber_hex v0.0.2 - - - - - - - - - - - -
    - - - -
    -
    -
    - - -

    - kuber_hex v0.0.2 - Kuber.Hex.Gateways.Monei - -

    - - -
    -

    An API client for the MONEI gateway.

    -

    For reference see MONEI’s API (v1) documentation.

    -

    The following features of MONEI are implemented:

    - -

    - - The opts argument -

    - -

    This is a Keyword list of optional arguments for transactions with the MONEI -gateway. The following keys are supported:

    - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    KeyRemarkStatus
    billing_addressNot implemented
    shipping_addressNot implemented
    customerNot implemented
    shipping_customerNot implemented
    merchantNot implemented
    cartNot implemented
    invoiceNot implemented
    customParametersNot implemented
    currencyNot implemented
    -

    - - MONEI quirks -

    - -
      -
    • MONEI does not process money in cents, and the amount is rounded to 2 decimal places. -
    • -
    -

    - - Caveats -

    - -

    Although MONEI supports payments from various cards, banks and virtual accounts (like some wallets), this library only accepts payments by (supported) cards.

    -

    - - TODO -

    - - - -
    - - - -
    -

    - - - Link to this section - - Summary -

    - - - -
    -

    - Functions -

    -
    - - -

    Performs a (pre) Authorize operation

    -
    - -
    -
    - - -

    Captures a pre-authorized amount

    -
    - -
    -
    - - -

    Makes the request to MONEI’s network

    -
    - -
    -
    - - -

    Credits the merchant account with amount by debiting the account of the customer

    -
    - -
    -
    - - -

    Credits the account of the customer with a reference to a prior transfer

    -
    - -
    -
    - - -

    Parses MONEI’s response and returns a Response struct in a :ok, :error tuple

    -
    - -
    -
    - - -

    Stores the payment-source data for later use

    -
    - -
    -
    - - -

    WIP

    -
    - -
    -
    - - -

    Validates the config dynamically depending on what is the value of required_config

    -
    - -
    -
    - - -

    Voids the referenced payment

    -
    - -
    - -
    - - - - -
    - - - - - -
    -

    - - - Link to this section - - Functions -

    -
    - - -
    - - - Link to this function - - authorize(amount, card, opts) - - - -
    - -
    authorize(number(), Kuber.Hex.CreditCard, keyword()) :: Kuber.Hex.Response
    - -
    - -
    -
    -

    Performs a (pre) Authorize operation.

    -

    The authorization validates the card details with the banking network, -places a hold on the transaction amount in the customer’s issuing bank also -triggers risk management. Funds are not transferred.

    -

    MONEI returns an ID string which can be used to:

    - -

    - - Note -

    - -

    A stand-alone pre-authorization expires in -72hrs.

    - -
    -
    -
    - - -
    - - - Link to this function - - capture(amount, paymentId, opts) - - - -
    - -
    capture(number(), String.t(), keyword()) :: Kuber.Hex.Response
    - -
    - -
    -
    -

    Captures a pre-authorized amount.

    -

    amount is transferred to the merchant account by MONEI when it is smaller or -equal to the amount used in the pre-authorization referenced by paymentId.

    -

    - - Note -

    - -

    MONEI allows partial captures and unlike many other gateways, does not release -the remaining amount back to the payment source. Thus, the same -pre-authorisation ID can be used to perform multiple captures, till:

    -
      -
    • all the pre-authorized amount is captured or, -
    • -
    • the remaining amount is explicitly “reversed” via void/2. [citation-needed] -
    • -
    - -
    -
    -
    - - -
    - - - Link to this function - - commit(method, endpoint, params, opts) - - - -
    - -
    commit(atom(), String.t(), keyword(), keyword()) ::
    -  {:ok, HTTPoison.Response} |
    -  {:error, HTTPoison.Error}
    - -
    - -
    -
    -

    Makes the request to MONEI’s network.

    - -
    -
    -
    - - -
    - - - Link to this function - - purchase(amount, card, opts) - - - -
    - -
    purchase(number(), Kuber.Hex.CreditCard, keyword()) :: Kuber.Hex.Response
    - -
    - -
    -
    -

    Credits the merchant account with amount by debiting the account of the customer.

    -

    MONEI attempts to debit the customer to accept a payment of amount with the -given card.

    - -
    -
    -
    - - -
    - - - Link to this function - - refund(amount, paymentId, opts) - - - -
    - -
    refund(number(), String.t(), keyword()) :: Kuber.Hex.Response
    - -
    - -
    -
    -

    Credits the account of the customer with a reference to a prior transfer.

    -

    MONEI can process a full or partial refund worth amount, referencing a -previous purchase/3 or capture/3ed.

    -

    The end customer will always see two bookings/records on his statement. Refer -MONEI’s Backoffice -Operations -guide.

    - -
    -
    -
    - - -
    - - - Link to this function - - respond(arg) - - - -
    -
    -

    Parses MONEI’s response and returns a Response struct in a :ok, :error tuple.

    - -
    -
    -
    - - -
    - - - Link to this function - - store(card, opts) - - - -
    - -
    store(Kuber.Hex.CreditCard, keyword()) :: Kuber.Hex.Response
    - -
    - -
    -
    -

    Stores the payment-source data for later use.

    -

    MONEI can store the payment-source details, for example card or bank details -which can be used to effectively process One-Click and Recurring payments, -and return a registration token for reference.

    -

    It is recommended to associate these details with a “Customer” by passing -customer details in the opts.

    -

    - - Note -

    - -
      -
    • One-Click and Recurring payments are currently not implemented. -
    • -
    • Payment details can be saved during a purchase/3 or capture/3. -
    • -
    - -
    -
    -
    - - -
    - - - Link to this function - - unstore(arg, opts) - - - -
    - -
    unstore(String.t(), keyword()) :: Kuber.Hex.Response
    - -
    - -
    -
    -

    WIP

    -

    MONEI unstore does not seem to work. MONEI always returns a 403

    -

    Deletes previously stored payment-source data.

    - -
    -
    -
    - - -
    - - - Link to this function - - validate_config(config) - - - -
    -
    -

    Validates the config dynamically depending on what is the value of required_config

    - -
    -
    -
    - - -
    - - - Link to this function - - void(paymentId, opts) - - - -
    - -
    void(String.t(), keyword()) :: Kuber.Hex.Response
    - -
    - -
    -
    -

    Voids the referenced payment.

    -

    This method attempts a reversal of the paymentId referencing either a -previous purchase/3 or authorize/3.

    -

    - - Voiding a previous authorization -

    - -

    MONEI will reverse the authorization by sending a “reversal request” to be -sent the payment source (card issuer) to clear the funds held against the -authorization. If some of the authorized amount was captured, only the -remaining amount is cleared. [citation-needed]

    -

    - - Voiding a previous purchase -

    - -

    MONEI will reverse the payment, by sending all the amount back to the -customer.

    -

    As a consequence, the customer will never see any booking on his -statement. Refer MONEI’s Backoffice -Operations -guide.

    - -
    -
    - -
    - - - - -
    -
    -
    -
    - - - - - - - - diff --git a/doc/Kuber.Hex.Gateways.Paymill.html b/doc/Kuber.Hex.Gateways.Paymill.html deleted file mode 100644 index fad1f0ab..00000000 --- a/doc/Kuber.Hex.Gateways.Paymill.html +++ /dev/null @@ -1,466 +0,0 @@ - - - - - - - - Kuber.Hex.Gateways.Paymill – kuber_hex v0.0.2 - - - - - - - - - - - -
    - - - -
    -
    -
    - - -

    - kuber_hex v0.0.2 - Kuber.Hex.Gateways.Paymill - -

    - - - - -
    -

    - - - Link to this section - - Summary -

    - - - - - - - - -
    - - - - - -
    -

    - - - Link to this section - - Functions -

    -
    - - -
    - - - Link to this function - - authorize(amount, card_or_token, options) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - authorize_with_token(money, card_token, options) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - capture(id, opts) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - capture(amount, authorization, options) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - get_save_card_params(card, options) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - purchase(amount, card, options) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - purchase_with_token(money, card_token, options) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - refund(amount, id, opts) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - save(card, options) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - save_card(card, options) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - store(card, opts) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - unstore(customer_id, card_id, opts) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - validate_config(config) - - - -
    -
    -

    Validates the config dynamically depending on what is the value of required_config

    - -
    -
    -
    - - -
    - - - Link to this function - - void(authorization, options) - - - -
    -
    - -
    -
    - -
    - - - - -
    -
    -
    -
    - - - - - - - - diff --git a/doc/Kuber.Hex.Gateways.Stripe.html b/doc/Kuber.Hex.Gateways.Stripe.html deleted file mode 100644 index b13611d8..00000000 --- a/doc/Kuber.Hex.Gateways.Stripe.html +++ /dev/null @@ -1,556 +0,0 @@ - - - - - - - - Kuber.Hex.Gateways.Stripe – kuber_hex v0.0.2 - - - - - - - - - - - -
    - - - -
    -
    -
    - - -

    - kuber_hex v0.0.2 - Kuber.Hex.Gateways.Stripe - -

    - - -
    -

    Functions for working with Stripe payment gateway. Through this API you can:

    -
      -
    • Authorize payment source and use it later for payment. -
    • -
    • Purchase with payment source. -
    • -
    • Capture a payment for already authorized payment source. -
    • -
    • Void the payment for payment source. -
    • -
    • Refund amount to payment source. -
    • -
    • Store payment source for making purchases later. -
    • -
    • Unstore payment source. -
    • -
    -

    Stripe API reference: https://stripe.com/docs/api

    - -
    - - - -
    -

    - - - Link to this section - - Summary -

    - - - -
    -

    - Functions -

    -
    - - -

    Authorize payment source

    -
    - -
    - -
    - - -

    Captures a payment

    -
    - -
    -
    - - -

    Purchase with payment source

    -
    - -
    -
    - - -

    Refunds the amount

    -
    - -
    -
    - - -

    Stores the payment source

    -
    - -
    -
    - - -

    Unstore the stored payment source

    -
    - -
    - -
    - - -

    Validates the config dynamically depending on what is the value of required_config

    -
    - -
    -
    - - -

    Voids the payment

    -
    - -
    - -
    - - - - -
    - - - - - -
    -

    - - - Link to this section - - Functions -

    -
    - - -
    - - - Link to this function - - authorize(amount, payment, opts) - - - -
    - -
    authorize(Float, Map, List) :: Map
    - -
    - -
    -
    -

    Authorize payment source.

    -

    Authorize the payment source for a customer or card using amount and opts. -opts must include the default currency.

    -

    - - Examples -

    - -

    payment = %{

    -
    expiration: {2018, 12}, number: "4242424242424242", cvc:  "123", name: "John Doe",
    -street1: "123 Main", street2: "Suite 100", city: "New York", region: "NY", country: "US",
    -postal_code: "11111"
    -

    }

    -

    opts = [currency: “usd”] - amount = 5

    -

    Kuber.Hex.Gateways.Stripe.authorize(amount, payment, opts)

    - -
    -
    -
    - - -
    - - - Link to this function - - capture(id, opts) - - - -
    -
    - -
    -
    -
    - - - - -
    - - - Link to this function - - capture(id, amount, opts \\ []) - - - -
    - -
    capture(String.t(), Float, List) :: Map
    - -
    - -
    -
    -

    Captures a payment.

    -

    Captures a payment with already authorized payment source. -Once the charge is captured, it cannot be captured again. -Amount less than or equal to authorized amount can be captured -but not more than that. -If less amount is captured than the authorized amount, then -remaining amount will be refunded back to the authorized -paymet source.

    -

    - - Examples -

    - -

    id = “ch_1BYvGkBImdnrXiZwet3aKkQE” - amount = 5 - opts = []

    -

    Kuber.Hex.Gateways.Stripe.capture(id, amount, opts)

    - -
    -
    -
    - - -
    - - - Link to this function - - purchase(amount, payment, opts) - - - -
    - -
    purchase(Float, Map, List) :: Map
    - -
    - -
    -
    -

    Purchase with payment source.

    -

    Purchase with the payment source using amount and opts. -opts must include the default currency.

    -

    - - Examples -

    - -

    payemnt = %{

    -
    expiration: {2018, 12}, number: "4242424242424242", cvc:  "123", name: "John Doe",
    -street1: "123 Main", street2: "Suite 100", city: "New York", region: "NY", country: "US",
    -postal_code: "11111"
    -

    }

    -

    opts = [currency: “usd”] - amount = 5

    -

    Kuber.Hex.Gateways.Stripe.purchase(amount, payment, opts)

    - -
    -
    -
    - - -
    - - - Link to this function - - refund(amount, id, opts) - - - -
    - -
    refund(Float, String.t(), List) :: Map
    - -
    - -
    -
    -

    Refunds the amount.

    -

    Returns the captured amount to the authorized payment source. -Less than or equal to the captured amount can be refunded. -If the refunded amount is less than the captured amount, then -remaining amount can be refunded again.

    -

    - - Examples -

    - -

    amount = 5 - id = “ch_1BYvGkBImdnrXiZwet3aKkQE” - opts = []

    -

    Kuber.Hex.Gateways.Stripe.refund(amount, id, opts)

    - -
    -
    -
    - - -
    - - - Link to this function - - store(payment, opts) - - - -
    - -
    store(Map, List) :: Map
    - -
    - -
    -
    -

    Stores the payment source.

    -

    Store the payment source, so that it can be used -for capturing the amount at later stages.

    -

    - - Examples -

    - -

    payment = %{

    -
    expiration: {2018, 12}, number: "4242424242424242", cvc:  "123", name: "John Doe",
    -street1: "123 Main", street2: "Suite 100", city: "New York", region: "NY", country: "US",
    -postal_code: "11111"
    -

    }

    -

    opts = []

    -

    Kuber.Hex.Gateways.Stripe.store(payment, opts)

    - -
    -
    -
    - - - - -
    - - - Link to this function - - unstore(id, opts \\ []) - - - -
    -
    -

    Unstore the stored payment source.

    -

    Unstore the already stored payment source, -so that it cannot be used again for capturing -payments.

    -

    - - Examples -

    - -

    id = “cus_BwpLX2x4ecEUgD”

    -

    Kuber.Hex.Gateways.Stripe.unstore(id)

    - -
    -
    -
    - - -
    - - - Link to this function - - unstore(customer_id, card_id, opts) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - validate_config(config) - - - -
    -
    -

    Validates the config dynamically depending on what is the value of required_config

    - -
    -
    -
    - - -
    - - - Link to this function - - void(id, opts) - - - -
    - -
    void(String.t(), List) :: Map
    - -
    - -
    -
    -

    Voids the payment.

    -

    Returns the captured amount to the authorized payment source.

    -

    - - Examples -

    - -

    id = “ch_1BYvGkBImdnrXiZwet3aKkQE” - opts = []

    -

    Kuber.Hex.Gateways.Stripe.void(id, opts)

    - -
    -
    - -
    - - - - -
    -
    -
    -
    - - - - - - - - diff --git a/doc/Kuber.Hex.Gateways.WireCard.html b/doc/Kuber.Hex.Gateways.WireCard.html deleted file mode 100644 index b292a694..00000000 --- a/doc/Kuber.Hex.Gateways.WireCard.html +++ /dev/null @@ -1,613 +0,0 @@ - - - - - - - - Kuber.Hex.Gateways.WireCard – kuber_hex v0.0.2 - - - - - - - - - - - -
    - - - -
    -
    -
    - - -

    - kuber_hex v0.0.2 - Kuber.Hex.Gateways.WireCard - -

    - - -
    -

    WireCard System Plugins

    - -
    - - - -
    -

    - - - Link to this section - - Summary -

    - - - -
    -

    - Functions -

    - - -
    - - -

    Authorization - the second parameter may be a CreditCard or - a String which represents a GuWID reference to an earlier - transaction. If a GuWID is given, rather than a CreditCard, - then then the :recurring option will be forced to “Repeated” - =========================================================== - TODO: Mandatorily check for :login,:password, :signature in options - Note: payment_menthod for now is only credit_card and - TODO: change it so it can also have GuWID - ================================================ - E.g: => - creditcard = %CreditCard{

    -
    number: "4200000000000000",
    -month: 12,
    -year: 2018,
    -first_name: "Longbob",
    -last_name: "Longsen",
    -verification_code: "123",
    -brand: "visa"
    -

    } - address = %{

    -
    name:     "Jim Smith",
    -address1: "456 My Street",
    -address2: "Apt 1",
    -company:  "Widgets Inc",
    -city:     "Ottawa",
    -state:    "ON",
    -zip:      "K1C2N6",
    -country:  "CA",
    -phone:    "(555)555-5555",
    -fax:      "(555)555-6666"
    -

    } - options = [

    -
    config: %{
    -  login: "00000031629CA9FA", 
    -  password: "TestXAPTER",
    -  signature: "00000031629CAFD5",
    -},   
    -order_id: 1,
    -billing_address: address,
    -description: 'Wirecard remote test purchase',
    -email: "soleone@example.com",
    -ip: "127.0.0.1",
    -test: true
    -

    ]

    -
    - -
    - -
    - - -

    Capture - the first paramter here should be a GuWid/authorization. - Authorization is obtained by authorizing the creditcard

    -
    - -
    -
    - - -

    Purchase - the second parameter may be a CreditCard or - a String which represents a GuWID reference to an earlier - transaction. If a GuWID is given, rather than a CreditCard, - then then the :recurring option will be forced to “Repeated”

    -
    - -
    -
    - - -

    Performs a credit

    -
    - -
    -
    - - -

    Store card - Wirecard supports the notion of “Recurring - Transactions” by allowing the merchant to provide a reference - to an earlier transaction (the GuWID) rather than a credit - card. A reusable reference (GuWID) can be obtained by sending - a purchase or authorization transaction with the element - “RECURRING_TRANSACTION/Type” set to “Initial”. Subsequent - transactions can then use the GuWID in place of a credit - card by setting “RECURRING_TRANSACTION/Type” to “Repeated”

    -
    - -
    - -
    - - -

    Validates the config dynamically depending on what is the value of required_config

    -
    - -
    -
    - - -

    Void - A credit card purchase that a seller cancels after it has

    -
      been authorized but before it has been settled. 
    -  A void transaction does not appear on the customer's 
    -  credit card statement, though it might appear in a list
    -  of pending transactions when the customer checks their 
    -  account online.
    -

    ==== Parameters ====== -identification - The authorization string returned from the

    -
                  initial authorization or purchase
    -
    - -
    - -
    - - - - -
    - - - - - -
    -

    - - - Link to this section - - Functions -

    -
    - - -
    - - - Link to this function - - add_action_data(action, money, options) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - add_invoice(money, options) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - authorize(money, payment_method, options) - - - -
    - -
    authorize(Integer | Float, Kuber.Hex.CreditCard | String.t(), Keyword) :: {:ok, Map}
    - -
    - -
    -
    -

    Authorization - the second parameter may be a CreditCard or - a String which represents a GuWID reference to an earlier - transaction. If a GuWID is given, rather than a CreditCard, - then then the :recurring option will be forced to “Repeated” - =========================================================== - TODO: Mandatorily check for :login,:password, :signature in options - Note: payment_menthod for now is only credit_card and - TODO: change it so it can also have GuWID - ================================================ - E.g: => - creditcard = %CreditCard{

    -
    number: "4200000000000000",
    -month: 12,
    -year: 2018,
    -first_name: "Longbob",
    -last_name: "Longsen",
    -verification_code: "123",
    -brand: "visa"
    -

    } - address = %{

    -
    name:     "Jim Smith",
    -address1: "456 My Street",
    -address2: "Apt 1",
    -company:  "Widgets Inc",
    -city:     "Ottawa",
    -state:    "ON",
    -zip:      "K1C2N6",
    -country:  "CA",
    -phone:    "(555)555-5555",
    -fax:      "(555)555-6666"
    -

    } - options = [

    -
    config: %{
    -  login: "00000031629CA9FA", 
    -  password: "TestXAPTER",
    -  signature: "00000031629CAFD5",
    -},   
    -order_id: 1,
    -billing_address: address,
    -description: 'Wirecard remote test purchase',
    -email: "soleone@example.com",
    -ip: "127.0.0.1",
    -test: true
    -

    ]

    - -
    -
    -
    - - -
    - - - Link to this function - - capture(id, opts) - - - -
    -
    - -
    -
    -
    - - - - -
    - - - Link to this function - - capture(authorization, money, options \\ []) - - - -
    - -
    capture(String.t(), Float, Keyword) :: {:ok, Map}
    - -
    - -
    -
    -

    Capture - the first paramter here should be a GuWid/authorization. - Authorization is obtained by authorizing the creditcard.

    - -
    -
    -
    - - -
    - - - Link to this function - - purchase(money, payment_method, options) - - - -
    - -
    purchase(Float | Integer, Kuber.Hex.CreditCard | String.t(), Keyword) :: {:ok, Map}
    - -
    - -
    -
    -

    Purchase - the second parameter may be a CreditCard or - a String which represents a GuWID reference to an earlier - transaction. If a GuWID is given, rather than a CreditCard, - then then the :recurring option will be forced to “Repeated”

    - -
    -
    -
    - - -
    - - - Link to this function - - refund(money, identification, options) - - - -
    - -
    refund(Float, String.t(), Keyword) :: {:ok, Map}
    - -
    - -
    -
    -

    Performs a credit.

    -

    This transaction indicates that money - should flow from the merchant to the customer. - ==== Parameters ==== - money — The amount to be credited to the customer

    -
                    as an Integer value in cents.
    -

    identification — GuWID

    - -
    -
    -
    - - -
    - - - Link to this function - - store(creditcard, options) - - - -
    - -
    store(Kuber.Hex.CreditCard, Keyword) :: {:ok, Map}
    - -
    - -
    -
    -

    Store card - Wirecard supports the notion of “Recurring - Transactions” by allowing the merchant to provide a reference - to an earlier transaction (the GuWID) rather than a credit - card. A reusable reference (GuWID) can be obtained by sending - a purchase or authorization transaction with the element - “RECURRING_TRANSACTION/Type” set to “Initial”. Subsequent - transactions can then use the GuWID in place of a credit - card by setting “RECURRING_TRANSACTION/Type” to “Repeated”.

    -

    This implementation of card store utilizes a Wirecard - “Authorization Check” (a Preauthorization that is automatically - reversed). It defaults to a check amount of “100” (i.e. - $1.00) but this can be overriden (see below).

    -

    IMPORTANT: In order to reuse the stored reference, the - +authorization+ from the response should be saved by - your application code.

    -

    ==== Options specific to +store+

    -
      -
    • :amount — The amount, in cents, that should be -“validated” by the Authorization Check. This amount will -be reserved and then reversed. Default is 100.

      -

      Note: This is not the only way to achieve a card store - operation at Wirecard. Any +purchase+ or +authorize+ - can be sent with +options[:recurring] = ‘Initial’+ to make - the returned authorization/GuWID usable in later transactions - with +options[:recurring] = ‘Repeated’+.

      -
    • -
    - -
    -
    -
    - - -
    - - - Link to this function - - unstore(customer_id, card_id, opts) - - - -
    -
    - -
    -
    -
    - - -
    - - - Link to this function - - validate_config(config) - - - -
    -
    -

    Validates the config dynamically depending on what is the value of required_config

    - -
    -
    -
    - - -
    - - - Link to this function - - void(identification, options) - - - -
    - -
    void(String.t(), Keyword) :: {:ok, Map}
    - -
    - -
    -
    -

    Void - A credit card purchase that a seller cancels after it has

    -
      been authorized but before it has been settled. 
    -  A void transaction does not appear on the customer's 
    -  credit card statement, though it might appear in a list
    -  of pending transactions when the customer checks their 
    -  account online.
    -

    ==== Parameters ====== -identification - The authorization string returned from the

    -
                  initial authorization or purchase.
    - -
    -
    - -
    - - - - -
    -
    -
    -
    - - - - - - - - diff --git a/doc/Kuber.Hex.Response.html b/doc/Kuber.Hex.Response.html deleted file mode 100644 index 16837ee6..00000000 --- a/doc/Kuber.Hex.Response.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - Kuber.Hex.Response – kuber_hex v0.0.2 - - - - - - - - - - - -
    - - - -
    -
    -
    - - -

    - kuber_hex v0.0.2 - Kuber.Hex.Response - -

    - - -
    -

    Module which defines the struct for response struct.

    -

    Response struct is a standard response from public API to the application.

    -

    TODO: Add the response struct detail about the attributes in the struct

    -

    It mostly has such as:-

    -
    * `success`: boolean indicating the status of the transaction
    -* `authorization`: token which is used to issue requests without the card info
    -* `code`: status code for the response
    -* `reason`: reason for the error if it happens
    -* `avs_result`: TODO: add this
    -* `cvc_result`: result for cvc verification 
    -* `raw`: TODO: add this
    - -
    - - - -
    -

    - - - Link to this section - - Summary -

    - - - -
    -

    - Functions -

    - - - -
    - - - - -
    - - - - - -
    -

    - - - Link to this section - - Functions -

    -
    - - - - -
    - - - Link to this function - - error(opts \\ []) - - - -
    -
    - -
    -
    -
    - - - - -
    - - - Link to this function - - success(opts \\ []) - - - -
    -
    - -
    -
    - -
    - - - - -
    -
    -
    -
    - - - - - - - - diff --git a/doc/Kuber.Hex.Worker.html b/doc/Kuber.Hex.Worker.html deleted file mode 100644 index 2ff11238..00000000 --- a/doc/Kuber.Hex.Worker.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - Kuber.Hex.Worker – kuber_hex v0.0.2 - - - - - - - - - - - -
    - - - -
    -
    -
    - - -

    - kuber_hex v0.0.2 - Kuber.Hex.Worker - -

    - - -
    -

    A central supervised worker handling all the calls for different gateways

    -

    It’s main task is to re-route the requests to the respective gateway methods.

    -

    State for this worker currently is:-

    -
      -
    • gateways:- a list of all the gateways configured in the application. -
    • -
    • all_configs:- All the configurations for all the gateways that are configured. -
    • -
    - -
    - - - -
    -

    - - - Link to this section - - Summary -

    - - - -
    -

    - Functions -

    -
    - - -

    Handles call for ‘unstore’ method

    -
    - -
    - - -
    - - - - -
    - - - - - -
    -

    - - - Link to this section - - Functions -

    -
    - - -
    - - - Link to this function - - handle_call(msg, from, state) - - - -
    -
    -

    Handles call for ‘unstore’ method

    - -
    -
    -
    - - - - -
    - - - Link to this function - - start_link(gateways, all_config, opts \\ []) - - - -
    -
    - -
    -
    - -
    - - - - -
    -
    -
    -
    - - - - - - - - diff --git a/doc/Kuber.Hex.html b/doc/Kuber.Hex.html deleted file mode 100644 index f81214a0..00000000 --- a/doc/Kuber.Hex.html +++ /dev/null @@ -1,557 +0,0 @@ - - - - - - - - Kuber.Hex – kuber_hex v0.0.2 - - - - - - - - - - - -
    - - - -
    -
    -
    - - -

    - kuber_hex v0.0.2 - Kuber.Hex - -

    - - -
    -

    Kuber.Hex is a payment gateway integration library supporting many gateway integrations.

    -

    Where the configuration for Kuber.Hex must be in your application -environment, usually defined in your config/config.exs:

    -
    config :kuber_hex, Kuber.Hex.Gateways.Stripe,
    -  adapter: Kuber.Hex.Gateways.Stripe,
    -  api_key: "sk_test_vIX41hC0sdfBKrPWQerLuOMld",
    -  default_currency: "USD"
    -

    Key for the configuration and the adapter value should be the same, we could have -chosen to pick adapter and used it as the key but we have chosen to be explicit rather -than implicit.

    -

    - - Standard Arguments -

    - -

    The public API is designed in such a way that library users end up passing mostly a -standard params for almost all requests.

    -

    - - Worker Name -

    - -

    eg: :payment_worker

    -

    The standard central supervised worker responsible for delegating/calling all - the payment specific methods such as authorise & purchase.

    -

    > This option is going to be removed in our next version.

    -

    - - Gateway Name -

    - -

    eg: Kuber.Hex.Gateways.Stripe

    -

    This option specifies which payment gateway this request should be called for. - Since Kuber.Hex supports multiple payment gateway integrations at the same time - so this information get’s critical.

    -

    - - Amount -

    - -

    eg: 5000

    -

    Amount is the money an application wants to deduct in cents on the card.

    -

    - - Card Info -

    - -

    eg:

    -
      %CreditCard {
    -    name: "John Doe",
    -    number: "4242424242424242",
    -    expiration: {2018, 12},
    -    cvc:  "123",
    -    street1: "123 Main",
    -    street2: "Suite 100",
    -    city: "New York",
    -    region: "NY",
    -    country: "US",
    -    postal_code: "11111" 
    -  }
    -

    This stores all the credit card info of the customer along with some address info etc.

    -

    - - Other options -

    - -

    eg: [currency: “usd”]

    -

    This is a keyword list of all the other options/information which the payment gateway - needs apart from the above mentioned options.

    -

    > This is passed as is to the gateway and not modified, usually it comes back in the - response object intact.

    - -
    - - - -
    -

    - - - Link to this section - - Summary -

    - - - -
    -

    - Functions -

    -
    - - -

    Authorize should authorize funds on a payment instrument that will -not be settled without a following call to capture within some finite -period of time. When implementing this API, authorize and capture are -both required

    -
    - -
    -
    - - -

    Captures deducts an amount from the card, this happens once the card is authorised

    -
    - -
    -
    - - -

    This is the bare minimum API for a gateway to support, and consists of a single call

    -
    - -
    -
    - - -

    Cancels settlement or returns funds as appropriate for a referenced prior -purchase or capture

    -
    - -
    -
    - - -

    Tokenizes a supported payment method in the gateway’s vault. If the gateway -conflates tokenization with customer management, Kuber.Hex should hide all -customer management and any customer identifier(s) within the token returned. -It’s certainly legitimate to have a library that interacts with all the features -in a gateway’s vault, but Kuber.Hex is not the right place for it

    -
    - -
    -
    - - -

    Removes the token from the payment gateway, once unstore request is fired the -token which could enable authorise & capture would not work with this token

    -
    - -
    -
    - - -

    Void is an optional (but highly recommended) supplement to authorise & capture -API that should immediately cancel an authorized charge, clearing it off of the -underlying payment instrument without waiting for expiration

    -
    - -
    - -
    - - - - -
    - - - - - -
    -

    - - - Link to this section - - Functions -

    -
    - - - - -
    - - - Link to this function - - authorize(worker, gateway, amount, card, opts \\ []) - - - -
    -
    -

    Authorize should authorize funds on a payment instrument that will -not be settled without a following call to capture within some finite -period of time. When implementing this API, authorize and capture are -both required.

    -
    @payment %{
    -  name: "John Doe",
    -  number: "4242424242424242",
    -  expiration: {2018, 12},
    -  cvc:  "123",
    -  street1: "123 Main",
    -  street2: "Suite 100",
    -  city: "New York",
    -  region: "NY",
    -  country: "US",
    -  postal_code: "11111"
    -}
    -
    -@options [currency: "usd"]
    -
    -Kuber.Hex.authorize(:payment_worker, Kuber.Hex.Gateways.Stripe, 5, @payment, @options)
    - -
    -
    -
    - - - - -
    - - - Link to this function - - capture(worker, gateway, id, amount, opts \\ []) - - - -
    -
    -

    Captures deducts an amount from the card, this happens once the card is authorised.

    -

    Partial captures, if supported by the gateway, are achieved by passing an amount. -Not passing an amount to capture should always cause the full amount of the initial -authorization to be captured.

    -

    If the gateway does not support partial captures, calling capture with an amount -other than nil should raise an error indicating partial capture is not supported.

    -
    @payment %{
    -  name: "John Doe",
    -  number: "4242424242424242",
    -  expiration: {2018, 12},
    -  cvc:  "123",
    -  street1: "123 Main",
    -  street2: "Suite 100",
    -  city: "New York",
    -  region: "NY",
    -  country: "US",
    -  postal_code: "11111"
    -}
    -
    -@options [currency: "usd"]
    -
    -id = "ch_1BYvGkBImdnrXiZwet3aKkQE"
    -
    -Kuber.Hex.capture(:payment_worker, Kuber.Hex.Gateways.Stripe, id, 5)
    - -
    -
    -
    - - - - -
    - - - Link to this function - - purchase(worker, gateway, amount, card, opts \\ []) - - - -
    -
    -

    This is the bare minimum API for a gateway to support, and consists of a single call:

    -
    @payment %{
    -  name: "John Doe",
    -  number: "4242424242424242",
    -  expiration: {2018, 12},
    -  cvc:  "123",
    -  street1: "123 Main",
    -  street2: "Suite 100",
    -  city: "New York",
    -  region: "NY",
    -  country: "US",
    -  postal_code: "11111"
    -}
    -
    -@options [currency: "usd"]
    -
    -Kuber.Hex.purchase(:payment_worker, Kuber.Hex.Gateways.Stripe, 5, @payment, @options)
    -

    This method is expected to authorize payment and transparently trigger eventual -settlement. Preferably it is implemented as a single call to the gateway, -but it can also be implemented as chained authorize and capture calls.

    - -
    -
    -
    - - - - -
    - - - Link to this function - - refund(worker, gateway, amount, id, opts \\ []) - - - -
    -
    -

    Cancels settlement or returns funds as appropriate for a referenced prior -purchase or capture.

    -
    @payment %{
    -  name: "John Doe",
    -  number: "4242424242424242",
    -  expiration: {2018, 12},
    -  cvc:  "123",
    -  street1: "123 Main",
    -  street2: "Suite 100",
    -  city: "New York",
    -  region: "NY",
    -  country: "US",
    -  postal_code: "11111"
    -}
    -
    -id = "ch_1BYvGkBImdnrXiZwet3aKkQE"
    -
    -Kuber.Hex.refund(:payment_worker, Kuber.Hex.Gateways.Stripe, 5, id)
    - -
    -
    -
    - - - - -
    - - - Link to this function - - store(worker, gateway, card, opts \\ []) - - - -
    -
    -

    Tokenizes a supported payment method in the gateway’s vault. If the gateway -conflates tokenization with customer management, Kuber.Hex should hide all -customer management and any customer identifier(s) within the token returned. -It’s certainly legitimate to have a library that interacts with all the features -in a gateway’s vault, but Kuber.Hex is not the right place for it.

    -

    It’s critical that store returns a token that can be used against purchase -and authorize. Currently the standard is to return the token in the -%Response{...} authorization field.

    -
    @payment %{
    -  name: "John Doe",
    -  number: "4242424242424242",
    -  expiration: {2018, 12},
    -  cvc:  "123",
    -  street1: "123 Main",
    -  street2: "Suite 100",
    -  city: "New York",
    -  region: "NY",
    -  country: "US",
    -  postal_code: "11111"
    -}
    -
    -id = "ch_1BYvGkBImdnrXiZwet3aKkQE"
    -
    -Kuber.Hex.store(:payment_worker, Kuber.Hex.Gateways.Stripe, @payment)
    - -
    -
    -
    - - - - -
    - - - Link to this function - - unstore(worker, gateway, customer_id, card_id, opts \\ []) - - - -
    -
    -

    Removes the token from the payment gateway, once unstore request is fired the -token which could enable authorise & capture would not work with this token.

    -

    This should be done once the payment capture is done and you don’t wish to make any -further deductions for the same card.

    -
    id = "ch_1BYvGkBImdnrXiZwet3aKkQE"
    -customer_id = "random_customer"
    -
    -Kuber.Hex.unstore(:payment_worker, Kuber.Hex.Gateways.Stripe, customer_id, id)
    - -
    -
    -
    - - - - -
    - - - Link to this function - - void(worker, gateway, id, opts \\ []) - - - -
    -
    -

    Void is an optional (but highly recommended) supplement to authorise & capture -API that should immediately cancel an authorized charge, clearing it off of the -underlying payment instrument without waiting for expiration.

    -
    @payment %{
    -  name: "John Doe",
    -  number: "4242424242424242",
    -  expiration: {2018, 12},
    -  cvc:  "123",
    -  street1: "123 Main",
    -  street2: "Suite 100",
    -  city: "New York",
    -  region: "NY",
    -  country: "US",
    -  postal_code: "11111"
    -}
    -
    -@options [currency: "usd"]
    -
    -id = "ch_1BYvGkBImdnrXiZwet3aKkQE"
    -
    -Kuber.Hex.void(:payment_worker, Kuber.Hex.Gateways.Stripe, id)
    - -
    -
    - -
    - - - - -
    -
    -
    -
    - - - - - - - - diff --git a/doc/api-reference.html b/doc/api-reference.html deleted file mode 100644 index 541f809c..00000000 --- a/doc/api-reference.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - API Reference – kuber_hex v0.0.2 - - - - - - - - - - - -
    - - - -
    -
    -
    - - -

    - kuber_hex v0.0.2 - API Reference -

    - - -
    -

    - - Modules -

    - -
    -
    - - -

    Kuber.Hex is a payment gateway integration library supporting many gateway integrations

    -
    - -
    -
    - - -

    Adapter module is currently holding the validation part

    -
    - -
    - -
    - - -

    Has the supervision tree which monitors all the workers -that are handling the payments

    -
    - -
    -
    - - -

    CreditCard module defines the struct for the credit cards

    -
    - -
    - - - -
    - - -

    An API client for the CAMS gateway. - For referance you can test gateway operations [CAMS API SANDBOX] (https://secure.centralams.com)

    -
    - -
    -
    - - -

    An API client for the MONEI gateway

    -
    - -
    - -
    - - -

    Functions for working with Stripe payment gateway. Through this API you can

    -
    - -
    -
    - - -

    WireCard System Plugins

    -
    - -
    -
    - - -

    Module which defines the struct for response struct

    -
    - -
    -
    - - -

    A central supervised worker handling all the calls for different gateways

    -
    - -
    - -
    -
    - - - - - - - -
    -
    -
    -
    - - - - - - - - diff --git a/doc/dist/app-778c9ef903.js b/doc/dist/app-778c9ef903.js deleted file mode 100644 index 94a99956..00000000 --- a/doc/dist/app-778c9ef903.js +++ /dev/null @@ -1,8 +0,0 @@ -!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";var r=n(1)["default"],i=n(2),o=r(i),a=n(3),u=r(a),s=n(4),l=n(86),c=n(89);window.$=o["default"],(0,o["default"])(function(){u["default"].configure({tabReplace:" ",languages:[]}),(0,c.initialize)(),(0,l.initialize)(),(0,s.initialize)(),u["default"].initHighlighting()})},function(e,t){"use strict";t["default"]=function(e){return e&&e.__esModule?e:{"default":e}},t.__esModule=!0},function(e,t,n){var r,i;!function(t,n){"object"==typeof e&&"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(n,o){function a(e){var t=!!e&&"length"in e&&e.length,n=le.type(e);return"function"!==n&&!le.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function u(e,t,n){if(le.isFunction(t))return le.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return le.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(be.test(t))return le.filter(t,e,n);t=le.filter(t,e)}return le.grep(e,function(e){return re.call(t,e)>-1!==n})}function s(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function l(e){var t={};return le.each(e.match(Ne)||[],function(e,n){t[n]=!0}),t}function c(){J.removeEventListener("DOMContentLoaded",c),n.removeEventListener("load",c),le.ready()}function f(){this.expando=le.expando+f.uid++}function p(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Me,"-$&").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Oe.test(n)?le.parseJSON(n):n)}catch(i){}je.set(e,t,n)}else n=void 0;return n}function d(e,t,n,r){var i,o=1,a=20,u=r?function(){return r.cur()}:function(){return le.css(e,t,"")},s=u(),l=n&&n[3]||(le.cssNumber[t]?"":"px"),c=(le.cssNumber[t]||"px"!==l&&+s)&&Re.exec(le.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+s||1;do o=o||".5",c/=o,le.style(e,t,c+l);while(o!==(o=u()/s)&&1!==o&&--a)}return n&&(c=+c||+s||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function h(e,t){var n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&le.nodeName(e,t)?le.merge([e],n):n}function g(e,t){for(var n=0,r=e.length;n-1)i&&i.push(o);else if(l=le.contains(o.ownerDocument,o),a=h(f.appendChild(o),"script"),l&&g(a),n)for(c=0;o=a[c++];)qe.test(o.type||"")&&n.push(o);return f}function m(){return!0}function y(){return!1}function b(){try{return J.activeElement}catch(e){}}function _(e,t,n,r,i,o){var a,u;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(u in t)_(e,u,n,r,t[u],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=y;else if(!i)return e;return 1===o&&(a=i,i=function(e){return le().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=le.guid++)),e.each(function(){le.event.add(this,t,i,r,n)})}function x(e,t){return le.nodeName(e,"table")&&le.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function w(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function E(e){var t=Xe.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function k(e,t){var n,r,i,o,a,u,s,l;if(1===t.nodeType){if(Se.hasData(e)&&(o=Se.access(e),a=Se.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n1&&"string"==typeof d&&!ue.checkClone&&Ge.test(d))return e.each(function(i){var o=e.eq(i);g&&(t[0]=d.call(this,i,o.html())),C(o,t,n,r)});if(f&&(i=v(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=le.map(h(i,"script"),w),u=a.length;c")).appendTo(t.documentElement),t=Ze[0].contentDocument,t.write(),t.close(),n=A(e,t),Ze.detach()),Ye[e]=n),n}function j(e,t,n){var r,i,o,a,u=e.style;return n=n||et(e),a=n?n.getPropertyValue(t)||n[t]:void 0,""!==a&&void 0!==a||le.contains(e.ownerDocument,e)||(a=le.style(e,t)),n&&!ue.pixelMarginRight()&&Je.test(a)&&Qe.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=n.width,u.width=r,u.minWidth=i,u.maxWidth=o),void 0!==a?a+"":a}function O(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function M(e){if(e in ut)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=at.length;n--;)if(e=at[n]+t,e in ut)return e}function D(e,t,n){var r=Re.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function R(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;o<4;o+=2)"margin"===n&&(a+=le.css(e,n+Le[o],!0,i)),r?("content"===n&&(a-=le.css(e,"padding"+Le[o],!0,i)),"margin"!==n&&(a-=le.css(e,"border"+Le[o]+"Width",!0,i))):(a+=le.css(e,"padding"+Le[o],!0,i),"padding"!==n&&(a+=le.css(e,"border"+Le[o]+"Width",!0,i)));return a}function L(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=et(e),a="border-box"===le.css(e,"boxSizing",!1,o);if(i<=0||null==i){if(i=j(e,t,o),(i<0||null==i)&&(i=e.style[t]),Je.test(i))return i;r=a&&(ue.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+R(e,t,n||(a?"border":"content"),r,o)+"px"}function P(e,t){for(var n,r,i,o=[],a=0,u=e.length;a=0&&n=0},isPlainObject:function(e){var t;if("object"!==le.type(e)||e.nodeType||le.isWindow(e))return!1;if(e.constructor&&!ae.call(e,"constructor")&&!ae.call(e.constructor.prototype||{},"isPrototypeOf"))return!1;for(t in e);return void 0===t||ae.call(e,t)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ie[oe.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;e=le.trim(e),e&&(1===e.indexOf("use strict")?(t=J.createElement("script"),t.text=e,J.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(fe,"ms-").replace(pe,de)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,r=0;if(a(e))for(n=e.length;rw.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[q]=!0,e}function i(e){var t=M.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)w.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||G)-(~e.sourceIndex||G);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function u(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function s(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function p(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,n,r){for(var i=0,o=n.length;i-1&&(r[l]=!(a[l]=f))}}else b=v(b===a?b.splice(h,b.length):b),o?o(null,a,b,s):Q.apply(a,b)})}function y(e){for(var t,n,r,i=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],u=o?1:0,s=d(function(e){return e===t},a,!0),l=d(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==A)||((t=n).nodeType?s(e,n,r):l(e,n,r));return t=null,i}];u1&&h(c),u>1&&p(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(ue,"$1"),n,u0,o=e.length>0,a=function(r,a,u,s,l){var c,f,p,d=0,h="0",g=r&&[],m=[],y=A,b=r||o&&w.find.TAG("*",l),_=$+=null==y?1:Math.random()||.1,x=b.length;for(l&&(A=a===M||a||l);h!==x&&null!=(c=b[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===M||(O(c),u=!R);p=e[f++];)if(p(c,a||M,u)){s.push(c);break}l&&($=_)}i&&((c=!p&&c)&&d--,r&&g.push(c))}if(d+=h,i&&h!==d){for(f=0;p=n[f++];)p(g,m,a,u);if(r){if(d>0)for(;h--;)g[h]||m[h]||(m[h]=Z.call(s));m=v(m)}Q.apply(s,m),l&&!r&&m.length>0&&d+n.length>1&&t.uniqueSort(s)}return l&&($=_,A=y),g};return i?r(a):a}var _,x,w,E,k,N,C,T,A,S,j,O,M,D,R,L,P,I,H,q="sizzle"+1*new Date,B=e.document,$=0,F=0,z=n(),W=n(),U=n(),K=function(e,t){return e===t&&(j=!0),0},G=1<<31,X={}.hasOwnProperty,V=[],Z=V.pop,Y=V.push,Q=V.push,J=V.slice,ee=function(e,t){for(var n=0,r=e.length;n+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(oe),pe=new RegExp("^"+re+"$"),de={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,ve=/^[^{]+\{\s*\[native \w/,me=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,be=/'|\\/g,_e=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),xe=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},we=function(){O()};try{Q.apply(V=J.call(B.childNodes),B.childNodes),V[B.childNodes.length].nodeType}catch(Ee){Q={apply:V.length?function(e,t){Y.apply(e,J.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}x=t.support={},k=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},O=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:B;return r!==M&&9===r.nodeType&&r.documentElement?(M=r,D=M.documentElement,R=!k(M),(n=M.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",we,!1):n.attachEvent&&n.attachEvent("onunload",we)),x.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=i(function(e){return e.appendChild(M.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=ve.test(M.getElementsByClassName),x.getById=i(function(e){return D.appendChild(e).id=q,!M.getElementsByName||!M.getElementsByName(q).length}),x.getById?(w.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&R){var n=t.getElementById(e);return n?[n]:[]}},w.filter.ID=function(e){var t=e.replace(_e,xe);return function(e){return e.getAttribute("id")===t}}):(delete w.find.ID,w.filter.ID=function(e){var t=e.replace(_e,xe);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),w.find.TAG=x.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):x.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=x.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&R)return t.getElementsByClassName(e)},P=[],L=[],(x.qsa=ve.test(M.querySelectorAll))&&(i(function(e){D.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&L.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||L.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+q+"-]").length||L.push("~="),e.querySelectorAll(":checked").length||L.push(":checked"),e.querySelectorAll("a#"+q+"+*").length||L.push(".#.+[+~]")}),i(function(e){var t=M.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&L.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||L.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),L.push(",.*:")})),(x.matchesSelector=ve.test(I=D.matches||D.webkitMatchesSelector||D.mozMatchesSelector||D.oMatchesSelector||D.msMatchesSelector))&&i(function(e){x.disconnectedMatch=I.call(e,"div"),I.call(e,"[s!='']:x"),P.push("!=",oe)}),L=L.length&&new RegExp(L.join("|")),P=P.length&&new RegExp(P.join("|")),t=ve.test(D.compareDocumentPosition),H=t||ve.test(D.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},K=t?function(e,t){if(e===t)return j=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===M||e.ownerDocument===B&&H(B,e)?-1:t===M||t.ownerDocument===B&&H(B,t)?1:S?ee(S,e)-ee(S,t):0:4&n?-1:1)}:function(e,t){if(e===t)return j=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,u=[e],s=[t];if(!i||!o)return e===M?-1:t===M?1:i?-1:o?1:S?ee(S,e)-ee(S,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)u.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;u[r]===s[r];)r++;return r?a(u[r],s[r]):u[r]===B?-1:s[r]===B?1:0},M):M},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==M&&O(e),n=n.replace(ce,"='$1']"),x.matchesSelector&&R&&!U[n+" "]&&(!P||!P.test(n))&&(!L||!L.test(n)))try{var r=I.call(e,n);if(r||x.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return t(n,M,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==M&&O(e),H(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==M&&O(e);var n=w.attrHandle[t.toLowerCase()],r=n&&X.call(w.attrHandle,t.toLowerCase())?n(e,t,!R):void 0;return void 0!==r?r:x.attributes||!R?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(j=!x.detectDuplicates,S=!x.sortStable&&e.slice(0),e.sort(K),j){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return S=null,e},E=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=E(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=E(t);return n},w=t.selectors={cacheLength:50,createPseudo:r,match:de,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(_e,xe),e[3]=(e[3]||e[4]||e[5]||"").replace(_e,xe),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return de.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=N(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(_e,xe).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=z[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&z(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ae," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),u="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,s){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",v=t.parentNode,m=u&&t.nodeName.toLowerCase(),y=!s&&!u,b=!1;if(v){if(o){for(;g;){for(p=t;p=p[g];)if(u?p.nodeName.toLowerCase()===m:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?v.firstChild:v.lastChild],a&&y){for(p=v,f=p[q]||(p[q]={}),c=f[p.uniqueID]||(f[p.uniqueID]={}),l=c[e]||[],d=l[0]===$&&l[1],b=d&&l[2],p=d&&v.childNodes[d];p=++d&&p&&p[g]||(b=d=0)||h.pop();)if(1===p.nodeType&&++b&&p===t){c[e]=[$,d,b];break}}else if(y&&(p=t,f=p[q]||(p[q]={}),c=f[p.uniqueID]||(f[p.uniqueID]={}),l=c[e]||[],d=l[0]===$&&l[1],b=d),b===!1)for(;(p=++d&&p&&p[g]||(b=d=0)||h.pop())&&((u?p.nodeName.toLowerCase()!==m:1!==p.nodeType)||!++b||(y&&(f=p[q]||(p[q]={}),c=f[p.uniqueID]||(f[p.uniqueID]={}),c[e]=[$,b]),p!==t)););return b-=i,b===r||b%r===0&&b/r>=0}}},PSEUDO:function(e,n){var i,o=w.pseudos[e]||w.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[q]?o(n):o.length>1?(i=[e,e,"",n],w.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=ee(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=C(e.replace(ue,"$1"));return i[q]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),u=e.length;u--;)(o=a[u])&&(e[u]=!(t[u]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(_e,xe),function(t){return(t.textContent||t.innerText||E(t)).indexOf(e)>-1}}),lang:r(function(e){return pe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(_e,xe).toLowerCase(),function(t){var n;do if(n=R?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===D},focus:function(e){return e===M.activeElement&&(!M.hasFocus||M.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1; -return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(a=o[0]).type&&x.getById&&9===t.nodeType&&R&&w.relative[o[1].type]){if(t=(w.find.ID(a.matches[0].replace(_e,xe),t)||[])[0],!t)return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=de.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[u=a.type]);)if((s=w.find[u])&&(r=s(a.matches[0].replace(_e,xe),ye.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&p(o),!e)return Q.apply(n,r),n;break}}return(l||C(e,f))(r,t,!R,n,!t||ye.test(e)&&c(t.parentNode)||t),n},x.sortStable=q.split("").sort(K).join("")===q,x.detectDuplicates=!!j,O(),x.sortDetached=i(function(e){return 1&e.compareDocumentPosition(M.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(n);le.find=he,le.expr=he.selectors,le.expr[":"]=le.expr.pseudos,le.uniqueSort=le.unique=he.uniqueSort,le.text=he.getText,le.isXMLDoc=he.isXML,le.contains=he.contains;var ge=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&le(e).is(n))break;r.push(e)}return r},ve=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},me=le.expr.match.needsContext,ye=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,be=/^.[^:#\[\.,]*$/;le.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?le.find.matchesSelector(r,e)?[r]:[]:le.find.matches(e,le.grep(t,function(e){return 1===e.nodeType}))},le.fn.extend({find:function(e){var t,n=this.length,r=[],i=this;if("string"!=typeof e)return this.pushStack(le(e).filter(function(){for(t=0;t1?le.unique(r):r),r.selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(u(this,e||[],!1))},not:function(e){return this.pushStack(u(this,e||[],!0))},is:function(e){return!!u(this,"string"==typeof e&&me.test(e)?le(e):e||[],!1).length}});var _e,xe=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,we=le.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||_e,"string"==typeof e){if(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:xe.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof le?t[0]:t,le.merge(this,le.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:J,!0)),ye.test(r[1])&&le.isPlainObject(t))for(r in t)le.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=J.getElementById(r[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=J,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):le.isFunction(e)?void 0!==n.ready?n.ready(e):e(le):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),le.makeArray(e,this))};we.prototype=le.fn,_e=le(J);var Ee=/^(?:parents|prev(?:Until|All))/,ke={children:!0,contents:!0,next:!0,prev:!0};le.fn.extend({has:function(e){var t=le(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&le.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?le.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?re.call(le(e),this[0]):re.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(le.uniqueSort(le.merge(this.get(),le(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),le.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ge(e,"parentNode")},parentsUntil:function(e,t,n){return ge(e,"parentNode",n)},next:function(e){return s(e,"nextSibling")},prev:function(e){return s(e,"previousSibling")},nextAll:function(e){return ge(e,"nextSibling")},prevAll:function(e){return ge(e,"previousSibling")},nextUntil:function(e,t,n){return ge(e,"nextSibling",n)},prevUntil:function(e,t,n){return ge(e,"previousSibling",n)},siblings:function(e){return ve((e.parentNode||{}).firstChild,e)},children:function(e){return ve(e.firstChild)},contents:function(e){return e.contentDocument||le.merge([],e.childNodes)}},function(e,t){le.fn[e]=function(n,r){var i=le.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=le.filter(r,i)),this.length>1&&(ke[e]||le.uniqueSort(i),Ee.test(e)&&i.reverse()),this.pushStack(i)}});var Ne=/\S+/g;le.Callbacks=function(e){e="string"==typeof e?l(e):le.extend({},e);var t,n,r,i,o=[],a=[],u=-1,s=function(){for(i=e.once,r=t=!0;a.length;u=-1)for(n=a.shift();++u-1;)o.splice(n,1),n<=u&&u--}),this},has:function(e){return e?le.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||s()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},le.extend({Deferred:function(e){var t=[["resolve","done",le.Callbacks("once memory"),"resolved"],["reject","fail",le.Callbacks("once memory"),"rejected"],["notify","progress",le.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return le.Deferred(function(n){le.each(t,function(t,o){var a=le.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&le.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?le.extend(e,r):r}},i={};return r.pipe=r.then,le.each(t,function(e,o){var a=o[2],u=o[3];r[o[1]]=a.add,u&&a.add(function(){n=u},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=ee.call(arguments),a=o.length,u=1!==a||e&&le.isFunction(e.promise)?a:0,s=1===u?e:le.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?ee.call(arguments):i,r===t?s.notifyWith(n,r):--u||s.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);i0||(Ce.resolveWith(J,[le]),le.fn.triggerHandler&&(le(J).triggerHandler("ready"),le(J).off("ready"))))}}),le.ready.promise=function(e){return Ce||(Ce=le.Deferred(),"complete"===J.readyState||"loading"!==J.readyState&&!J.documentElement.doScroll?n.setTimeout(le.ready):(J.addEventListener("DOMContentLoaded",c),n.addEventListener("load",c))),Ce.promise(e)},le.ready.promise();var Te=function(e,t,n,r,i,o,a){var u=0,s=e.length,l=null==n;if("object"===le.type(n)){i=!0;for(u in n)Te(e,t,u,n[u],!0,o,a)}else if(void 0!==r&&(i=!0,le.isFunction(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(le(e),n)})),t))for(;u-1&&void 0!==n&&je.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){je.remove(this,e)})}}),le.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Se.get(e,t),n&&(!r||le.isArray(n)?r=Se.access(e,t,le.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=le.queue(e,t),r=n.length,i=n.shift(),o=le._queueHooks(e,t),a=function(){le.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Se.get(e,n)||Se.access(e,n,{empty:le.Callbacks("once memory").add(function(){Se.remove(e,[t+"queue",n])})})}}),le.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length",""],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};Be.optgroup=Be.option,Be.tbody=Be.tfoot=Be.colgroup=Be.caption=Be.thead,Be.th=Be.td;var $e=/<|&#?\w+;/;!function(){var e=J.createDocumentFragment(),t=e.appendChild(J.createElement("div")),n=J.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),ue.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",ue.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Fe=/^key/,ze=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,We=/^([^.]*)(?:\.(.+)|)/;le.event={global:{},add:function(e,t,n,r,i){var o,a,u,s,l,c,f,p,d,h,g,v=Se.get(e);if(v)for(n.handler&&(o=n,n=o.handler,i=o.selector),n.guid||(n.guid=le.guid++),(s=v.events)||(s=v.events={}),(a=v.handle)||(a=v.handle=function(t){return"undefined"!=typeof le&&le.event.triggered!==t.type?le.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(Ne)||[""],l=t.length;l--;)u=We.exec(t[l])||[],d=g=u[1],h=(u[2]||"").split(".").sort(),d&&(f=le.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=le.event.special[d]||{},c=le.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&le.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=s[d])||(p=s[d]=[],p.delegateCount=0,f.setup&&f.setup.call(e,r,h,a)!==!1||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),le.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,u,s,l,c,f,p,d,h,g,v=Se.hasData(e)&&Se.get(e);if(v&&(s=v.events)){for(t=(t||"").match(Ne)||[""],l=t.length;l--;)if(u=We.exec(t[l])||[],d=g=u[1],h=(u[2]||"").split(".").sort(),d){for(f=le.event.special[d]||{},d=(r?f.delegateType:f.bindType)||d,p=s[d]||[],u=u[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||u&&!u.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&f.teardown.call(e,h,v.handle)!==!1||le.removeEvent(e,d,v.handle),delete s[d])}else for(d in s)le.event.remove(e,d+t[l],n,r,!0);le.isEmptyObject(s)&&Se.remove(e,"handle events")}},dispatch:function(e){e=le.event.fix(e);var t,n,r,i,o,a=[],u=ee.call(arguments),s=(Se.get(this,"events")||{})[e.type]||[],l=le.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){for(a=le.event.handlers.call(this,e,s),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(o.namespace)||(e.handleObj=o,e.data=o.data,r=((le.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],u=t.delegateCount,s=e.target;if(u&&s.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;s!==this;s=s.parentNode||this)if(1===s.nodeType&&(s.disabled!==!0||"click"!==e.type)){for(r=[],n=0;n-1:le.find(i,this,null,[s]).length),r[i]&&r.push(o);r.length&&a.push({elem:s,handlers:r})}return u]*)\/>/gi,Ke=/\s*$/g;le.extend({htmlPrefilter:function(e){return e.replace(Ue,"<$1>")},clone:function(e,t,n){var r,i,o,a,u=e.cloneNode(!0),s=le.contains(e.ownerDocument,e);if(!(ue.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||le.isXMLDoc(e)))for(a=h(u),o=h(e),r=0,i=o.length;r0&&g(a,!s&&h(e,"script")),u},cleanData:function(e){for(var t,n,r,i=le.event.special,o=0;void 0!==(n=e[o]);o++)if(Ae(n)){if(t=n[Se.expando]){if(t.events)for(r in t.events)i[r]?le.event.remove(n,r):le.removeEvent(n,r,t.handle);n[Se.expando]=void 0}n[je.expando]&&(n[je.expando]=void 0)}}}),le.fn.extend({domManip:C,detach:function(e){return T(this,e,!0)},remove:function(e){return T(this,e)},text:function(e){return Te(this,function(e){return void 0===e?le.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return C(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=x(this,e);t.appendChild(e)}})},prepend:function(){return C(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=x(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return C(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return C(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(le.cleanData(h(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return le.clone(this,e,t)})},html:function(e){return Te(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ke.test(e)&&!Be[(He.exec(e)||["",""])[1].toLowerCase()]){e=le.htmlPrefilter(e);try{for(;n1)},show:function(){return P(this,!0)},hide:function(){return P(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Pe(this)?le(this).show():le(this).hide()})}}),le.Tween=I,I.prototype={constructor:I,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||le.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(le.cssNumber[n]?"":"px")},cur:function(){var e=I.propHooks[this.prop];return e&&e.get?e.get(this):I.propHooks._default.get(this)},run:function(e){var t,n=I.propHooks[this.prop];return this.options.duration?this.pos=t=le.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):I.propHooks._default.set(this),this}},I.prototype.init.prototype=I.prototype,I.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=le.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){le.fx.step[e.prop]?le.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[le.cssProps[e.prop]]&&!le.cssHooks[e.prop]?e.elem[e.prop]=e.now:le.style(e.elem,e.prop,e.now+e.unit)}}},I.propHooks.scrollTop=I.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},le.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},le.fx=I.prototype.init,le.fx.step={};var st,lt,ct=/^(?:toggle|show|hide)$/,ft=/queueHooks$/;le.Animation=le.extend(z,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return d(n.elem,e,Re.exec(t),n),n}]},tweener:function(e,t){le.isFunction(e)?(t=e,e=["*"]):e=e.match(Ne);for(var n,r=0,i=e.length;r1)},removeAttr:function(e){return this.each(function(){le.removeAttr(this,e)})}}),le.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?le.prop(e,t,n):(1===o&&le.isXMLDoc(e)||(t=t.toLowerCase(),i=le.attrHooks[t]||(le.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void le.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=le.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!ue.radioValue&&"radio"===t&&le.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(Ne);if(o&&1===e.nodeType)for(;n=o[i++];)r=le.propFix[n]||n,le.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)}}),pt={set:function(e,t,n){return t===!1?le.removeAttr(e,n):e.setAttribute(n,n),n}},le.each(le.expr.match.bool.source.match(/\w+/g),function(e,t){var n=dt[t]||le.find.attr;dt[t]=function(e,t,r){var i,o;return r||(o=dt[t],dt[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,dt[t]=o),i}});var ht=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;le.fn.extend({prop:function(e,t){return Te(this,le.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[le.propFix[e]||e]})}}),le.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&le.isXMLDoc(e)||(t=le.propFix[t]||t,i=le.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=le.find.attr(e,"tabindex");return t?parseInt(t,10):ht.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),ue.optSelected||(le.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),le.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){le.propFix[this.toLowerCase()]=this});var vt=/[\t\r\n\f]/g;le.fn.extend({addClass:function(e){var t,n,r,i,o,a,u,s=0;if(le.isFunction(e))return this.each(function(t){le(this).addClass(e.call(this,t,W(this)))});if("string"==typeof e&&e)for(t=e.match(Ne)||[];n=this[s++];)if(i=W(n),r=1===n.nodeType&&(" "+i+" ").replace(vt," ")){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");u=le.trim(r),i!==u&&n.setAttribute("class",u)}return this},removeClass:function(e){var t,n,r,i,o,a,u,s=0;if(le.isFunction(e))return this.each(function(t){le(this).removeClass(e.call(this,t,W(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(Ne)||[];n=this[s++];)if(i=W(n),r=1===n.nodeType&&(" "+i+" ").replace(vt," ")){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");u=le.trim(r),i!==u&&n.setAttribute("class",u)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):le.isFunction(e)?this.each(function(n){le(this).toggleClass(e.call(this,n,W(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=le(this),o=e.match(Ne)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=W(this),t&&Se.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":Se.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+W(n)+" ").replace(vt," ").indexOf(t)>-1)return!0;return!1}});var mt=/\r/g,yt=/[\x20\t\r\n\f]+/g;le.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=le.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,le(this).val()):e,null==i?i="":"number"==typeof i?i+="":le.isArray(i)&&(i=le.map(i,function(e){return null==e?"":e+""})),t=le.valHooks[this.type]||le.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=le.valHooks[i.type]||le.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(mt,""):null==n?"":n)}}}),le.extend({valHooks:{option:{get:function(e){var t=le.find.attr(e,"value");return null!=t?t:le.trim(le.text(e)).replace(yt," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,a=o?null:[],u=o?i+1:r.length,s=i<0?u:o?i:0;s-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),le.each(["radio","checkbox"],function(){le.valHooks[this]={set:function(e,t){if(le.isArray(t))return e.checked=le.inArray(le(e).val(),t)>-1}},ue.checkOn||(le.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var bt=/^(?:focusinfocus|focusoutblur)$/;le.extend(le.event,{trigger:function(e,t,r,i){var o,a,u,s,l,c,f,p=[r||J],d=ae.call(e,"type")?e.type:e,h=ae.call(e,"namespace")?e.namespace.split("."):[];if(a=u=r=r||J,3!==r.nodeType&&8!==r.nodeType&&!bt.test(d+le.event.triggered)&&(d.indexOf(".")>-1&&(h=d.split("."),d=h.shift(),h.sort()),l=d.indexOf(":")<0&&"on"+d,e=e[le.expando]?e:new le.Event(d,"object"==typeof e&&e),e.isTrigger=i?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:le.makeArray(t,[e]),f=le.event.special[d]||{},i||!f.trigger||f.trigger.apply(r,t)!==!1)){if(!i&&!f.noBubble&&!le.isWindow(r)){for(s=f.delegateType||d,bt.test(s+d)||(a=a.parentNode);a;a=a.parentNode)p.push(a),u=a;u===(r.ownerDocument||J)&&p.push(u.defaultView||u.parentWindow||n)}for(o=0;(a=p[o++])&&!e.isPropagationStopped();)e.type=o>1?s:f.bindType||d,c=(Se.get(a,"events")||{})[e.type]&&Se.get(a,"handle"),c&&c.apply(a,t),c=l&&a[l],c&&c.apply&&Ae(a)&&(e.result=c.apply(a,t),e.result===!1&&e.preventDefault());return e.type=d,i||e.isDefaultPrevented()||f._default&&f._default.apply(p.pop(),t)!==!1||!Ae(r)||l&&le.isFunction(r[d])&&!le.isWindow(r)&&(u=r[l],u&&(r[l]=null),le.event.triggered=d,r[d](),le.event.triggered=void 0,u&&(r[l]=u)),e.result}},simulate:function(e,t,n){var r=le.extend(new le.Event,n,{type:e,isSimulated:!0});le.event.trigger(r,null,t)}}),le.fn.extend({trigger:function(e,t){return this.each(function(){le.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return le.event.trigger(e,t,n,!0)}}),le.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){le.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),le.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),ue.focusin="onfocusin"in n,ue.focusin||le.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){le.event.simulate(t,e.target,le.event.fix(e))};le.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=Se.access(r,t);i||r.addEventListener(e,n,!0),Se.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Se.access(r,t)-1;i?Se.access(r,t,i):(r.removeEventListener(e,n,!0),Se.remove(r,t))}}});var _t=n.location,xt=le.now(),wt=/\?/;le.parseJSON=function(e){return JSON.parse(e+"")},le.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(r){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||le.error("Invalid XML: "+e),t};var Et=/#.*$/,kt=/([?&])_=[^&]*/,Nt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ct=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Tt=/^(?:GET|HEAD)$/,At=/^\/\//,St={},jt={},Ot="*/".concat("*"),Mt=J.createElement("a");Mt.href=_t.href,le.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:_t.href,type:"GET",isLocal:Ct.test(_t.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ot,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":le.parseJSON,"text xml":le.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?G(G(e,le.ajaxSettings),t):G(le.ajaxSettings,e)},ajaxPrefilter:U(St),ajaxTransport:U(jt),ajax:function(e,t){function r(e,t,r,u){var l,f,y,b,x,E=t;2!==_&&(_=2,s&&n.clearTimeout(s),i=void 0,a=u||"",w.readyState=e>0?4:0,l=e>=200&&e<300||304===e,r&&(b=X(p,w,r)),b=V(p,b,w,l),l?(p.ifModified&&(x=w.getResponseHeader("Last-Modified"),x&&(le.lastModified[o]=x),x=w.getResponseHeader("etag"),x&&(le.etag[o]=x)),204===e||"HEAD"===p.type?E="nocontent":304===e?E="notmodified":(E=b.state,f=b.data,y=b.error,l=!y)):(y=E,!e&&E||(E="error",e<0&&(e=0))),w.status=e,w.statusText=(t||E)+"",l?g.resolveWith(d,[f,E,w]):g.rejectWith(d,[w,E,y]),w.statusCode(m),m=void 0,c&&h.trigger(l?"ajaxSuccess":"ajaxError",[w,p,l?f:y]),v.fireWith(d,[w,E]),c&&(h.trigger("ajaxComplete",[w,p]),--le.active||le.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,o,a,u,s,l,c,f,p=le.ajaxSetup({},t),d=p.context||p,h=p.context&&(d.nodeType||d.jquery)?le(d):le.event,g=le.Deferred(),v=le.Callbacks("once memory"),m=p.statusCode||{},y={},b={},_=0,x="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(2===_){if(!u)for(u={};t=Nt.exec(a);)u[t[1].toLowerCase()]=t[2];t=u[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===_?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return _||(e=b[n]=b[n]||e,y[e]=t),this},overrideMimeType:function(e){return _||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(_<2)for(t in e)m[t]=[m[t],e[t]];else w.always(e[w.status]);return this},abort:function(e){var t=e||x;return i&&i.abort(t),r(0,t),this}};if(g.promise(w).complete=v.add,w.success=w.done,w.error=w.fail,p.url=((e||p.url||_t.href)+"").replace(Et,"").replace(At,_t.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=le.trim(p.dataType||"*").toLowerCase().match(Ne)||[""],null==p.crossDomain){l=J.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=Mt.protocol+"//"+Mt.host!=l.protocol+"//"+l.host}catch(E){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=le.param(p.data,p.traditional)),K(St,p,t,w),2===_)return w;c=le.event&&p.global,c&&0===le.active++&&le.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Tt.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(wt.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=kt.test(o)?o.replace(kt,"$1_="+xt++):o+(wt.test(o)?"&":"?")+"_="+xt++)),p.ifModified&&(le.lastModified[o]&&w.setRequestHeader("If-Modified-Since",le.lastModified[o]),le.etag[o]&&w.setRequestHeader("If-None-Match",le.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||t.contentType)&&w.setRequestHeader("Content-Type",p.contentType),w.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Ot+"; q=0.01":""):p.accepts["*"]);for(f in p.headers)w.setRequestHeader(f,p.headers[f]);if(p.beforeSend&&(p.beforeSend.call(d,w,p)===!1||2===_))return w.abort();x="abort";for(f in{success:1,error:1,complete:1})w[f](p[f]);if(i=K(jt,p,t,w)){if(w.readyState=1,c&&h.trigger("ajaxSend",[w,p]),2===_)return w;p.async&&p.timeout>0&&(s=n.setTimeout(function(){w.abort("timeout")},p.timeout));try{_=1,i.send(y,r)}catch(E){if(!(_<2))throw E;r(-1,E)}}else r(-1,"No Transport");return w},getJSON:function(e,t,n){return le.get(e,t,n,"json")},getScript:function(e,t){return le.get(e,void 0,t,"script")}}),le.each(["get","post"],function(e,t){le[t]=function(e,n,r,i){return le.isFunction(n)&&(i=i||r,r=n,n=void 0),le.ajax(le.extend({url:e,type:t,dataType:i,data:n,success:r},le.isPlainObject(e)&&e))}}),le._evalUrl=function(e){return le.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},le.fn.extend({wrapAll:function(e){var t;return le.isFunction(e)?this.each(function(t){le(this).wrapAll(e.call(this,t))}):(this[0]&&(t=le(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return le.isFunction(e)?this.each(function(t){le(this).wrapInner(e.call(this,t))}):this.each(function(){var t=le(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=le.isFunction(e);return this.each(function(n){le(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){le.nodeName(this,"body")||le(this).replaceWith(this.childNodes)}).end()}}),le.expr.filters.hidden=function(e){return!le.expr.filters.visible(e)},le.expr.filters.visible=function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0};var Dt=/%20/g,Rt=/\[\]$/,Lt=/\r?\n/g,Pt=/^(?:submit|button|image|reset|file)$/i,It=/^(?:input|select|textarea|keygen)/i;le.param=function(e,t){var n,r=[],i=function(e,t){t=le.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=le.ajaxSettings&&le.ajaxSettings.traditional),le.isArray(e)||e.jquery&&!le.isPlainObject(e))le.each(e,function(){i(this.name,this.value)});else for(n in e)Z(n,e[n],t,i);return r.join("&").replace(Dt,"+")},le.fn.extend({serialize:function(){return le.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=le.prop(this,"elements");return e?le.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!le(this).is(":disabled")&&It.test(this.nodeName)&&!Pt.test(e)&&(this.checked||!Ie.test(e))}).map(function(e,t){var n=le(this).val();return null==n?null:le.isArray(n)?le.map(n,function(e){return{name:t.name,value:e.replace(Lt,"\r\n")}}):{name:t.name,value:n.replace(Lt,"\r\n")}}).get()}}),le.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Ht={0:200,1223:204},qt=le.ajaxSettings.xhr();ue.cors=!!qt&&"withCredentials"in qt,ue.ajax=qt=!!qt,le.ajaxTransport(function(e){var t,r;if(ue.cors||qt&&!e.crossDomain)return{send:function(i,o){var a,u=e.xhr();if(u.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)u[a]=e.xhrFields[a];e.mimeType&&u.overrideMimeType&&u.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)u.setRequestHeader(a,i[a]);t=function(e){return function(){t&&(t=r=u.onload=u.onerror=u.onabort=u.onreadystatechange=null,"abort"===e?u.abort():"error"===e?"number"!=typeof u.status?o(0,"error"):o(u.status,u.statusText):o(Ht[u.status]||u.status,u.statusText,"text"!==(u.responseType||"text")||"string"!=typeof u.responseText?{binary:u.response}:{text:u.responseText},u.getAllResponseHeaders()))}},u.onload=t(),r=u.onerror=t("error"),void 0!==u.onabort?u.onabort=r:u.onreadystatechange=function(){4===u.readyState&&n.setTimeout(function(){t&&r()})},t=t("abort");try{u.send(e.hasContent&&e.data||null)}catch(s){if(t)throw s}},abort:function(){t&&t()}}}),le.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return le.globalEval(e),e}}}),le.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),le.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=le("",returnEnd:!0,subLanguage:["actionscript","javascript","handlebars"]}},n,{className:"pi",begin:/<\?\w+/,end:/\?>/,relevance:10},{className:"tag",begin:"",contains:[{className:"title",begin:/[^ \/><\n\t]+/,relevance:0},r]}]}}),e.registerLanguage("markdown",function(e){return{aliases:["md","mkdown","mkd"],contains:[{className:"header",variants:[{begin:"^#{1,6}",end:"$"},{begin:"^.+?\\n[=-]{2,}$"}]},{begin:"<",end:">",subLanguage:"xml",relevance:0},{className:"bullet",begin:"^([*+-]|(\\d+\\.))\\s+"},{className:"strong",begin:"[*_]{2}.+?[*_]{2}"},{className:"emphasis",variants:[{begin:"\\*.+?\\*"},{begin:"_.+?_",relevance:0}]},{className:"blockquote",begin:"^>\\s+",end:"$"},{className:"code",variants:[{begin:"`.+?`"},{begin:"^( {4}|\t)",end:"$",relevance:0}]},{className:"horizontal_rule",begin:"^[-\\*]{3,}",end:"$"},{begin:"\\[.+?\\][\\(\\[].*?[\\)\\]]",returnBegin:!0,contains:[{className:"link_label",begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0,relevance:0},{className:"link_url",begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"link_reference",begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}],relevance:10},{begin:"^\\[.+\\]:",returnBegin:!0,contains:[{className:"link_reference",begin:"\\[",end:"\\]:",excludeBegin:!0,excludeEnd:!0,starts:{className:"link_url",end:"$"}}]}]}}),e.registerLanguage("sql",function(e){var t=e.COMMENT("--","$");return{case_insensitive:!0,illegal:/[<>{}*]/,contains:[{className:"operator",beginKeywords:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke",end:/;/,endsWithParent:!0,keywords:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes c cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle d data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration e each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract f failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function g general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http i id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists k keep keep_duplicates key keys kill l language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim m main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex n name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding p package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime t table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},contains:[{className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE,{begin:"''"}]},{className:"string",begin:'"',end:'"',contains:[e.BACKSLASH_ESCAPE,{begin:'""'}]},{className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t]},e.C_BLOCK_COMMENT_MODE,t]}}),e})},function(e,t,n){"use strict";function r(e){w.forEach(function(t){t===e?(0,v["default"])(t).parent().addClass("selected"):(0,v["default"])(t).parent().removeClass("selected")})}function i(){var e=(0,v["default"])("#full-list"),t=(0,v["default"])("#full-list .clicked");t.length>0&&e.scrollTop(t.offset().top-e.offset().top-40)}function o(e,t){var n=b.getModuleType();t=t||n;var i=e[t]||[],o=(0,v["default"])("#full-list");o.replaceWith((0,x["default"])({nodes:i,group:""})),r(["#",t,"-list"].join("")),(0,v["default"])("#full-list li a").on("click",function(e){var t=(0,v["default"])(e.target);t.hasClass("expand")?(e.preventDefault(),(0,v["default"])(e.target).closest("li").toggleClass("open")):((0,v["default"])("#full-list .clicked li.active").removeClass("active"),(0,v["default"])(e.target).closest("li").addClass("active"))})}function a(e){return function(t){t.preventDefault(),o(sidebarNodes,e),i()}}function u(){E.on("click","#extras-list",a("extras")),E.on("click","#modules-list",a("modules")),E.on("click","#exceptions-list",a("exceptions")),E.on("click","#tasks-list",a("tasks")),(0,v["default"])(".sidebar-search input").on("keydown",function(e){27===e.keyCode?(0,v["default"])(this).val(""):(event.metaKey||event.ctrlKey)&&13===e.keyCode&&((0,v["default"])(this).parent().attr("target","_blank").submit().removeAttr(""),e.preventDefault())});var e=window.location.pathname;"search.html"===e.substr(e.lastIndexOf("/")+1)&&(0,m.search)(s("q"))}function s(e){var t=window.location.href,n=e.replace(/[\[\]]/g,"\\$&"),r=new RegExp("[?&]"+n+"(=([^&#]*)|&|#|$)"),i=r.exec(t);return i&&i[2]?decodeURIComponent(i[2].replace(/\+/g," ")):""}function l(){var e=b.getLocationHash()||"content",t=sidebarNodes[b.getModuleType()],n=b.findSidebarCategory(t,e);(0,v["default"])('#full-list .clicked a.expand[href$="#'+n+'"]').closest("li").addClass("open"),(0,v["default"])('#full-list .clicked a[href$="#'+e+'"]').closest("li").addClass("active")}function c(){k.find("a").has("code").addClass("no-underline"),k.find("a").has("img").addClass("no-underline")}function f(){k.attr("tabindex",-1).focus()}function p(){o(sidebarNodes),u(),i(),l(),c(),f()}var d=n(1)["default"],h=n(5)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.initialize=p;var g=n(2),v=d(g),m=n(6),y=n(7),b=h(y),_=n(81),x=d(_),w=["#extras-list","#modules-list","#exceptions-list","#tasks-list","#search-list"],E=(0,v["default"])(".sidebar-listNav"),k=(0,v["default"])(".content")},function(e,t){"use strict";t["default"]=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t},t.__esModule=!0},function(e,t,n){"use strict";function r(e){var t=e.index,n=e.index+e[0].length,r=e.input,i=""+e[0]+"";return r.slice(0,t)+i+r.slice(n)}function i(e){return!!e}function o(e,t,n){return(e||[]).map(function(e){var i=(t+"."+e.id).match(n),o=e.id&&e.id.match(n);if(i||o){var a=JSON.parse(JSON.stringify(e));return a.match=o?r(o):e.id,a}}).filter(i)}function a(e,t,n){t.length>0&&e.push({name:n,results:t})}function u(e,t){return e.map(function(e){var n=e.title,i=n&&n.match(t),a=o(e.functions,n,t),u=o(e.macros,n,t),s=o(e.callbacks,n,t),l=o(e.types,n,t),c={id:e.id,match:i?r(i):e.title};if(a.length>0&&(c.functions=a),u.length>0&&(c.macros=u),s.length>0&&(c.callbacks=s),l.length>0&&(c.types=l),i||a.length>0||u.length>0||s.length>0||l.length>0)return c}).filter(i)}function s(e){var t=sidebarNodes;if(""!==e.replace(/\s/,"")){var n=new RegExp(h.escapeText(e),"i"),r=[],i=u(t.modules,n),o=u(t.exceptions,n),s=u(t.tasks,n);a(r,i,"Modules"),a(r,o,"Exceptions"),a(r,s,"Mix Tasks");var l=(0,v["default"])({value:e,levels:r,empty:0===r.length});y.val(e),m.html(l)}}var l=n(1)["default"],c=n(5)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.findIn=u,t.search=s;var f=n(2),p=l(f),d=n(7),h=c(d),g=n(61),v=l(g),m=(0,p["default"])("#search"),y=(0,p["default"])(".sidebar-search input")},function(e,t,n){"use strict";function r(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function i(){return(0,c["default"])("body").data("type")}function o(e,t){var n=!0,r=!1,i=void 0;try{for(var o,a=u(e);!(n=(o=a.next()).done);n=!0){var s=o.value,l=(0,h["default"])(s,function(e,n){var r=(0,p["default"])(e,function(e){var n=e.anchor;return n===t});return r});if(l)return l}}catch(c){r=!0,i=c}finally{try{!n&&a["return"]&&a["return"]()}finally{if(r)throw i}}}function a(){return window.location.hash.replace(/^#/,"")}var u=n(8)["default"],s=n(1)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.escapeText=r,t.getModuleType=i,t.findSidebarCategory=o,t.getLocationHash=a;var l=n(2),c=s(l),f=n(46),p=s(f),d=n(59),h=s(d)},function(e,t,n){e.exports={"default":n(9),__esModule:!0}},function(e,t,n){n(10),n(38),e.exports=n(41)},function(e,t,n){n(11);var r=n(14);r.NodeList=r.HTMLCollection=r.Array},function(e,t,n){"use strict";var r=n(12),i=n(13),o=n(14),a=n(15);e.exports=n(19)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):"keys"==t?i(0,n):"values"==t?i(0,e[n]):i(0,[n,e[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t){e.exports={}},function(e,t,n){var r=n(16),i=n(18);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(17);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";var r=n(20),i=n(21),o=n(26),a=n(27),u=n(32),s=n(14),l=n(33),c=n(34),f=n(28).getProto,p=n(35)("iterator"),d=!([].keys&&"next"in[].keys()),h="@@iterator",g="keys",v="values",m=function(){return this};e.exports=function(e,t,n,y,b,_,x){l(n,t,y);var w,E,k=function(e){if(!d&&e in A)return A[e];switch(e){case g:return function(){return new n(this,e)};case v:return function(){return new n(this,e)}}return function(){return new n(this,e)}},N=t+" Iterator",C=b==v,T=!1,A=e.prototype,S=A[p]||A[h]||b&&A[b],j=S||k(b);if(S){var O=f(j.call(new e));c(O,N,!0),!r&&u(A,h)&&a(O,p,m),C&&S.name!==v&&(T=!0,j=function(){return S.call(this)})}if(r&&!x||!d&&!T&&A[p]||a(A,p,j),s[t]=j,s[N]=m,b)if(w={values:C?j:k(v),keys:_?j:k(g),entries:C?k("entries"):j},x)for(E in w)E in A||o(A,E,w[E]);else i(i.P+i.F*(d||T),t,w);return w}},function(e,t){e.exports=!0},function(e,t,n){var r=n(22),i=n(23),o=n(24),a="prototype",u=function(e,t,n){var s,l,c,f=e&u.F,p=e&u.G,d=e&u.S,h=e&u.P,g=e&u.B,v=e&u.W,m=p?i:i[t]||(i[t]={}),y=p?r:d?r[t]:(r[t]||{})[a];p&&(n=t);for(s in n)l=!f&&y&&s in y,l&&s in m||(c=l?y[s]:n[s],m[s]=p&&"function"!=typeof y[s]?n[s]:g&&l?o(c,r):v&&y[s]==c?function(e){var t=function(t){return this instanceof e?new e(t):e(t)};return t[a]=e[a],t}(c):h&&"function"==typeof c?o(Function.call,c):c,h&&((m[a]||(m[a]={}))[s]=c))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,e.exports=u},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){var n=e.exports={version:"1.2.6"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(25);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){e.exports=n(27)},function(e,t,n){var r=n(28),i=n(29);e.exports=n(30)?function(e,t,n){return r.setDesc(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){var n=Object;e.exports={create:n.create,getProto:n.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:n.getOwnPropertyDescriptor,setDesc:n.defineProperty,setDescs:n.defineProperties,getKeys:n.keys,getNames:n.getOwnPropertyNames,getSymbols:n.getOwnPropertySymbols, -each:[].forEach}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){e.exports=!n(31)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){"use strict";var r=n(28),i=n(29),o=n(34),a={};n(27)(a,n(35)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r.create(a,{next:i(1,n)}),o(e,t+" Iterator")}},function(e,t,n){var r=n(28).setDesc,i=n(32),o=n(35)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){var r=n(36)("wks"),i=n(37),o=n(22).Symbol;e.exports=function(e){return r[e]||(r[e]=o&&o[e]||(o||i)("Symbol."+e))}},function(e,t,n){var r=n(22),i="__core-js_shared__",o=r[i]||(r[i]={});e.exports=function(e){return o[e]||(o[e]={})}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){"use strict";var r=n(39)(!0);n(19)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){var r=n(40),i=n(18);e.exports=function(e){return function(t,n){var o,a,u=String(i(t)),s=r(n),l=u.length;return s<0||s>=l?e?"":void 0:(o=u.charCodeAt(s),o<55296||o>56319||s+1===l||(a=u.charCodeAt(s+1))<56320||a>57343?e?u.charAt(s):o:e?u.slice(s,s+2):(o-55296<<10)+(a-56320)+65536)}}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(42),i=n(44);e.exports=n(23).getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return r(t.call(e))}},function(e,t,n){var r=n(43);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(45),i=n(35)("iterator"),o=n(14);e.exports=n(23).getIteratorMethod=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){var r=n(17),i=n(35)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=(t=Object(e))[i])?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){function r(e,t){return function(n,r,o){if(r=i(r,o,3),s(n)){var l=u(n,r,t);return l>-1?n[l]:void 0}return a(n,r,e)}}var i=n(47),o=n(56),a=n(57),u=n(58),s=n(49),l=r(o);e.exports=l},function(e,t,n){function r(e){return null==e?"":e+""}function i(e,t,n){var r=typeof e;return"function"==r?void 0===t?e:w(e,t,n):null==e?b:"object"==r?u(e):void 0===t?_(e):s(e,t)}function o(e,t,n){if(null!=e){void 0!==n&&n in g(e)&&(t=[n]);for(var r=0,i=t.length;null!=e&&ri?0:i+t),n=void 0===n||n>i?i:+n||0,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++rl))return!1;for(;++s-1&&e%1==0&&e<=m}function o(e){return a(e)&&h.call(e)==l}function a(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function u(e){return null!=e&&(o(e)?g.test(p.call(e)):n(e)&&c.test(e))}var s="[object Array]",l="[object Function]",c=/^\[object .+?Constructor\]$/,f=Object.prototype,p=Function.prototype.toString,d=f.hasOwnProperty,h=f.toString,g=RegExp("^"+p.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),v=r(Array,"isArray"),m=9007199254740991,y=v||function(e){return n(e)&&i(e.length)&&h.call(e)==s};e.exports=y},function(e,t){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function r(e){return!!e&&"object"==typeof e}function i(e){return r(e)&&n(e.length)&&!!j[M.call(e)]}var o=9007199254740991,a="[object Arguments]",u="[object Array]",s="[object Boolean]",l="[object Date]",c="[object Error]",f="[object Function]",p="[object Map]",d="[object Number]",h="[object Object]",g="[object RegExp]",v="[object Set]",m="[object String]",y="[object WeakMap]",b="[object ArrayBuffer]",_="[object DataView]",x="[object Float32Array]",w="[object Float64Array]",E="[object Int8Array]",k="[object Int16Array]",N="[object Int32Array]",C="[object Uint8Array]",T="[object Uint8ClampedArray]",A="[object Uint16Array]",S="[object Uint32Array]",j={};j[x]=j[w]=j[E]=j[k]=j[N]=j[C]=j[T]=j[A]=j[S]=!0,j[a]=j[u]=j[b]=j[s]=j[_]=j[l]=j[c]=j[f]=j[p]=j[d]=j[h]=j[g]=j[v]=j[m]=j[y]=!1;var O=Object.prototype,M=O.toString;e.exports=i},function(e,t,n){function r(e){return function(t){return null==t?void 0:t[e]}}function i(e){return null!=e&&a(y(e))}function o(e,t){return e="number"==typeof e||d.test(e)?+e:-1,t=null==t?m:t,e>-1&&e%1==0&&e-1&&e%1==0&&e<=m}function u(e){for(var t=l(e),n=t.length,r=n&&e.length,i=!!r&&a(r)&&(p(e)||f(e)),u=-1,s=[];++u0;++r-1&&e%1==0&&e<=l}function u(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function s(e){return!!e&&"object"==typeof e}var l=9007199254740991,c="[object Arguments]",f="[object Function]",p="[object GeneratorFunction]",d=Object.prototype,h=d.hasOwnProperty,g=d.toString,v=d.propertyIsEnumerable;e.exports=n},function(e,t){function n(e,t,n){if("function"!=typeof e)return r;if(void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)};case 5:return function(n,r,i,o,a){return e.call(t,n,r,i,o,a)}}return function(){return e.apply(t,arguments)}}function r(e){return e}e.exports=n},function(e,t,n){function r(e){return i(e)?e:Object(e)}function i(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function o(e){e=r(e);for(var t=-1,n=a(e),i=n.length,o=Array(i);++t-1&&e%1==0&&e<=f}function s(e){return l(e)?e:Object(e)}function l(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var c=n(51),f=9007199254740991,p=o(r),d=a(),h=i("length");e.exports=p},function(e,t){function n(e,t,n,r){var i;return n(e,function(e,n,o){if(t(e,n,o))return i=r?n:e,!1}),i}e.exports=n},function(e,t){function n(e,t,n){for(var r=e.length,i=n?r:-1;n?i--:++iSorry, we couldn't find anything for "+e.escapeExpression((o=null!=(o=n.value||(null!=t?t.value:t))?o:n.helperMissing,"function"==typeof o?o.call(null!=t?t:e.nullContext||{},{name:"value",hash:{},data:i}):o))+".

    \n"},3:function(e,t,n,r,i,o,a){var u;return null!=(u=n.each.call(null!=t?t:e.nullContext||{},null!=t?t.levels:t,{name:"each",hash:{},fn:e.program(4,i,0,o,a),inverse:e.noop,data:i}))?u:""},4:function(e,t,n,r,i,o,a){var u,s,l=null!=t?t:e.nullContext||{};return'

    '+e.escapeExpression((s=null!=(s=n.name||(null!=t?t.name:t))?s:n.helperMissing,"function"==typeof s?s.call(l,{name:"name",hash:{},data:i}):s))+"

    \n"+(null!=(u=n.each.call(l,null!=t?t.results:t,{name:"each",hash:{},fn:e.program(5,i,0,o,a),inverse:e.noop,data:i}))?u:"")},5:function(e,t,n,r,i,o,a){var u,s,l=null!=t?t:e.nullContext||{},c=n.helperMissing,f="function";return'
    \n

    \n '+(null!=(s=null!=(s=n.match||(null!=t?t.match:t))?s:c,u=typeof s===f?s.call(l,{name:"match",hash:{},data:i}):s)?u:"")+'\n

    \n
      \n'+(null!=(u=n.each.call(l,null!=t?t.functions:t,{name:"each",hash:{},fn:e.program(6,i,0,o,a),inverse:e.noop,data:i}))?u:"")+'
    \n
      \n'+(null!=(u=n.each.call(l,null!=t?t.macros:t,{name:"each",hash:{},fn:e.program(6,i,0,o,a),inverse:e.noop,data:i}))?u:"")+'
    \n
      \n'+(null!=(u=n.each.call(l,null!=t?t.callbacks:t,{name:"each",hash:{},fn:e.program(8,i,0,o,a),inverse:e.noop,data:i}))?u:"")+'
    \n
      \n'+(null!=(u=n.each.call(l,null!=t?t.types:t,{name:"each",hash:{},fn:e.program(10,i,0,o,a),inverse:e.noop,data:i}))?u:"")+"
    \n
    \n"},6:function(e,t,n,r,i,o,a){var u,s,l=null!=t?t:e.nullContext||{},c=n.helperMissing,f="function";return'
  • '+(null!=(s=null!=(s=n.match||(null!=t?t.match:t))?s:c,u=typeof s===f?s.call(l,{name:"match",hash:{},data:i}):s)?u:"")+"
  • \n"},8:function(e,t,n,r,i,o,a){var u,s,l=null!=t?t:e.nullContext||{},c=n.helperMissing,f="function";return'
  • '+(null!=(s=null!=(s=n.match||(null!=t?t.match:t))?s:c,u=typeof s===f?s.call(l,{name:"match",hash:{},data:i}):s)?u:"")+" (callback)
  • \n"},10:function(e,t,n,r,i,o,a){var u,s,l=null!=t?t:e.nullContext||{},c=n.helperMissing,f="function";return'
  • '+(null!=(s=null!=(s=n.match||(null!=t?t.match:t))?s:c,u=typeof s===f?s.call(l,{name:"match",hash:{},data:i}):s)?u:"")+" (type)
  • \n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i,o,a){var u,s,l=null!=t?t:e.nullContext||{};return"

    Search Results for "+e.escapeExpression((s=null!=(s=n.value||(null!=t?t.value:t))?s:n.helperMissing,"function"==typeof s?s.call(l,{name:"value",hash:{},data:i}):s))+"

    \n\n"+(null!=(u=n["if"].call(l,null!=t?t.empty:t,{name:"if",hash:{},fn:e.program(1,i,0,o,a),inverse:e.program(3,i,0,o,a),data:i}))?u:"")},useData:!0,useDepths:!0})},function(e,t,n){e.exports=n(63)["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function o(){var e=new u.HandlebarsEnvironment;return d.extend(e,u),e.SafeString=l["default"],e.Exception=f["default"],e.Utils=d,e.escapeExpression=d.escapeExpression,e.VM=g,e.template=function(t){return g.template(t,e)},e}t.__esModule=!0;var a=n(64),u=i(a),s=n(78),l=r(s),c=n(66),f=r(c),p=n(65),d=i(p),h=n(79),g=i(h),v=n(80),m=r(v),y=o();y.create=o,m["default"](y),y["default"]=y,t["default"]=y,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n){this.helpers=e||{},this.partials=t||{},this.decorators=n||{},s.registerDefaultHelpers(this),l.registerDefaultDecorators(this)}t.__esModule=!0,t.HandlebarsEnvironment=i;var o=n(65),a=n(66),u=r(a),s=n(67),l=n(75),c=n(77),f=r(c),p="4.0.10";t.VERSION=p;var d=7;t.COMPILER_REVISION=d;var h={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0"};t.REVISION_CHANGES=h;var g="[object Object]";i.prototype={constructor:i,logger:f["default"],log:f["default"].log,registerHelper:function(e,t){if(o.toString.call(e)===g){if(t)throw new u["default"]("Arg not supported with multiple helpers");o.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){if(o.toString.call(e)===g)o.extend(this.partials,e);else{if("undefined"==typeof t)throw new u["default"]('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=t}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,t){if(o.toString.call(e)===g){if(t)throw new u["default"]("Arg not supported with multiple decorators");o.extend(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function(e){delete this.decorators[e]}};var v=f["default"].log;t.log=v,t.createFrame=o.createFrame,t.logger=f["default"]},function(e,t){"use strict";function n(e){return c[e]}function r(e){for(var t=1;t":">",'"':""","'":"'","`":"`","=":"="},f=/[&<>"'`=]/g,p=/[&<>"'`=]/,d=Object.prototype.toString;t.toString=d;var h=function(e){return"function"==typeof e};h(/x/)&&(t.isFunction=h=function(e){return"function"==typeof e&&"[object Function]"===d.call(e)}),t.isFunction=h;var g=Array.isArray||function(e){return!(!e||"object"!=typeof e)&&"[object Array]"===d.call(e)};t.isArray=g},function(e,t){"use strict";function n(e,t){var i=t&&t.loc,o=void 0,a=void 0;i&&(o=i.start.line,a=i.start.column,e+=" - "+o+":"+a);for(var u=Error.prototype.constructor.call(this,e),s=0;s0?(n.ids&&(n.ids=[n.name]),e.helpers.each(t,n)):i(this);if(n.data&&n.ids){var a=r.createFrame(n.data);a.contextPath=r.appendContextPath(n.data.contextPath,n.name),n={data:a}}return o(t,n)})},e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var i=n(65),o=n(66),a=r(o);t["default"]=function(e){e.registerHelper("each",function(e,t){function n(t,n,o){l&&(l.key=t,l.index=n,l.first=0===n,l.last=!!o,c&&(l.contextPath=c+t)),s+=r(e[t],{data:l,blockParams:i.blockParams([e[t],t],[c+t,null])})}if(!t)throw new a["default"]("Must pass iterator to #each");var r=t.fn,o=t.inverse,u=0,s="",l=void 0,c=void 0;if(t.data&&t.ids&&(c=i.appendContextPath(t.data.contextPath,t.ids[0])+"."),i.isFunction(e)&&(e=e.call(this)),t.data&&(l=i.createFrame(t.data)),e&&"object"==typeof e)if(i.isArray(e))for(var f=e.length;u=0?t:parseInt(e,10)}return e},log:function(e){if(e=i.lookupLevel(e),"undefined"!=typeof console&&i.lookupLevel(i.level)<=e){var t=i.methodMap[e];console[t]||(t="log");for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o\n\n\n '+p(f(null!=(l=u[0][0])?l.title:l,t))+'\n\n
      \n
    • \n Top\n
    • \n\n'+(null!=(l=r(n(84)).call(c,null!=(l=u[0][0])?l.headers:l,{name:"isArray",hash:{},fn:e.program(6,a,0,u,s),inverse:e.program(9,a,0,u,s),data:a,blockParams:u}))?l:"")+"
    \n \n"},2:function(e,t,n,r,i,o){var a;return'
  • '+e.escapeExpression(e.lambda(null!=(a=o[1][0])?a.group:a,t))+"
  • \n"},4:function(e,t,n,r,i){return"clicked open"},6:function(e,t,n,r,i,o){var a;return null!=(a=n.each.call(null!=t?t:e.nullContext||{},null!=(a=o[1][0])?a.headers:a,{name:"each",hash:{},fn:e.program(7,i,0,o),inverse:e.noop,data:i,blockParams:o}))?a:""},7:function(e,t,n,r,i,o){var a,u=e.lambda,s=e.escapeExpression;return'
  • \n '+s(u(null!=t?t.id:t,t))+"\n
  • \n"},9:function(e,t,i,o,a,u){var s,l=null!=t?t:e.nullContext||{};return(null!=(s=r(n(85)).call(l,u[1][0],{name:"showSummary",hash:{},fn:e.program(10,a,0,u),inverse:e.noop,data:a,blockParams:u}))?s:"")+(null!=(s=i["if"].call(l,null!=(s=u[1][0])?s.types:s,{name:"if",hash:{},fn:e.program(12,a,0,u),inverse:e.noop,data:a,blockParams:u}))?s:"")+(null!=(s=i["if"].call(l,null!=(s=u[1][0])?s.functions:s,{name:"if",hash:{},fn:e.program(15,a,0,u),inverse:e.noop,data:a,blockParams:u}))?s:"")+(null!=(s=i["if"].call(l,null!=(s=u[1][0])?s.macros:s,{name:"if",hash:{},fn:e.program(17,a,0,u),inverse:e.noop,data:a,blockParams:u}))?s:"")+(null!=(s=i["if"].call(l,null!=(s=u[1][0])?s.callbacks:s,{ -name:"if",hash:{},fn:e.program(20,a,0,u),inverse:e.noop,data:a,blockParams:u}))?s:"")},10:function(e,t,n,r,i,o){var a;return'
  • \n Summary\n
  • \n'},12:function(e,t,n,r,i,o){var a;return'
  • \n Types\n
      \n'+(null!=(a=n.each.call(null!=t?t:e.nullContext||{},null!=(a=o[2][0])?a.types:a,{name:"each",hash:{},fn:e.program(13,i,0,o),inverse:e.noop,data:i,blockParams:o}))?a:"")+"
    \n
  • \n"},13:function(e,t,n,r,i,o){var a,u=e.lambda,s=e.escapeExpression;return'
  • \n '+s(u(null!=t?t.id:t,t))+"\n
  • \n"},15:function(e,t,n,r,i,o){var a;return'
  • \n Functions\n
      \n'+(null!=(a=n.each.call(null!=t?t:e.nullContext||{},null!=(a=o[2][0])?a.functions:a,{name:"each",hash:{},fn:e.program(13,i,0,o),inverse:e.noop,data:i,blockParams:o}))?a:"")+"
    \n
  • \n"},17:function(e,t,n,r,i,o){var a;return'
  • \n Macros\n
      \n'+(null!=(a=n.each.call(null!=t?t:e.nullContext||{},null!=(a=o[2][0])?a.macros:a,{name:"each",hash:{},fn:e.program(18,i,0,o),inverse:e.noop,data:i,blockParams:o}))?a:"")+"
    \n
  • \n"},18:function(e,t,n,r,i,o){var a,u=e.lambda,s=e.escapeExpression;return'
  • \n '+s(u(null!=t?t.id:t,t))+"\n
  • \n"},20:function(e,t,n,r,i,o){var a;return'
  • \n Callbacks\n
      \n'+(null!=(a=n.each.call(null!=t?t:e.nullContext||{},null!=(a=o[2][0])?a.callbacks:a,{name:"each",hash:{},fn:e.program(18,i,0,o),inverse:e.noop,data:i,blockParams:o}))?a:"")+"
    \n
  • \n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,r,i,o,a){var u;return'
      \n'+(null!=(u=n.each.call(null!=t?t:e.nullContext||{},null!=t?t.nodes:t,{name:"each",hash:{},fn:e.program(1,i,2,o,a),inverse:e.noop,data:i,blockParams:o}))?u:"")+"
    \n"},useData:!0,useDepths:!0,useBlockParams:!0})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e,t,n){var r=t||"";if(e.group!==r)return e.group=r,n.fn(this)},e.exports=t["default"]},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e,t){var n=window.location.pathname.split("/");return e+=".html",e===n[n.length-1]?t.fn(this):t.inverse(this)},e.exports=t["default"]},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e,t){return Array.isArray(e)?t.fn(this):t.inverse(this)},e.exports=t["default"]},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e,t){if(e.types||e.functions||e.macros||e.callbacks)return t.fn(this)},e.exports=t["default"]},function(e,t,n){"use strict";function r(){p.addClass(y).removeClass(g).removeClass(v),_=setTimeout(function(){return p.addClass(m).removeClass(y)},h)}function i(){p.addClass(v).removeClass(m).removeClass(y),_=setTimeout(function(){return p.addClass(g).removeClass(v)},h)}function o(){var e=p.attr("class")||"";clearTimeout(_),e.includes(m)||e.includes(y)?i():r()}function a(){p.removeClass(b),p.addClass(window.innerWidth>d?g:m)}function u(){a();var e=window.innerWidth;(0,c["default"])(window).resize((0,f.throttle)(function(){e!==window.innerWidth&&(e=window.innerWidth,a())},100)),(0,c["default"])(".sidebar-toggle").click(function(){o()})}var s=n(1)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.initialize=u;var l=n(2),c=s(l),f=n(87),p=(0,c["default"])("body"),d=768,h=300,g="sidebar-opened",v="sidebar-opening",m="sidebar-closed",y="sidebar-closing",b=[g,v,m,y].join(" "),_=void 0;t.breakpoint=d,t.closeSidebar=r},function(e,t,n){var r;(function(e,i){(function(){function o(e,t){if(e!==t){var n=null===e,r=e===T,i=e===e,o=null===t,a=t===T,u=t===t;if(e>t&&!o||!i||n&&!a&&u||r&&u)return 1;if(e-1;);return n}function f(e,t){for(var n=e.length;n--&&t.indexOf(e.charAt(n))>-1;);return n}function p(e,t){return o(e.criteria,t.criteria)||e.index-t.index}function d(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,u=i.length,s=n.length;++r=s)return l;var c=n[r];return l*("asc"===c||c===!0?1:-1)}}return e.index-t.index}function h(e){return Ke[e]}function g(e){return Ge[e]}function v(e,t,n){return t?e=Ze[e]:n&&(e=Ye[e]),"\\"+e}function m(e){return"\\"+Ye[e]}function y(e,t,n){for(var r=e.length,i=t+(n?0:-1);n?i--:++i=9&&e<=13||32==e||160==e||5760==e||6158==e||e>=8192&&(e<=8202||8232==e||8233==e||8239==e||8287==e||12288==e||65279==e)}function x(e,t){for(var n=-1,r=e.length,i=-1,o=[];++n=F?gn(t):null,l=t.length;s&&(o=Ye,a=!1,t=s);e:for(;++ii?0:i+n),r=r===T||r>i?i:+r||0,r<0&&(r+=i),i=n>r?0:r>>>0,n>>>=0;ni?0:i+t),n=n===T||n>i?i:+n||0,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=$o(i);++r=F,s=a?gn():null,l=[];s?(r=Ye,o=!1):(a=!1,s=t?[]:l);e:for(;++n>>1,a=e[o];(n?a<=t:a2?n[i-2]:T,a=i>2?n[2]:T,u=i>1?n[i-1]:T;for("function"==typeof o?(o=an(o,u,5),i-=2):(o="function"==typeof u?u:T,i-=o?1:0),a&&Jn(n[0],n[1],a)&&(o=i<3?T:o,i=1);++r-1?n[o]:T}return At(n,r,e)}}function wn(e){return function(t,n,r){return t&&t.length?(n=$n(n,r,3),a(t,n,e)):-1}}function En(e){return function(t,n,r){return n=$n(n,r,3),At(t,n,e,!0)}}function kn(e){return function(){for(var t,n=arguments.length,i=e?n:-1,o=0,a=$o(n);e?i--:++i=F)return t.plant(r).value();for(var i=0,o=n?a[i].apply(this,e):r;++i=t||!_a(t))return"";var i=t-r;return n=null==n?" ":n+"",mo(n,va(i/n.length)).slice(0,i)}function Rn(e,t,n,r){function i(){for(var t=-1,u=arguments.length,s=-1,l=r.length,c=$o(l+u);++ss))return!1;for(;++u-1&&e%1==0&&e-1&&e%1==0&&e<=Ma}function rr(e){return e===e&&!Ri(e)}function ir(e,t){var n=e[1],r=t[1],i=n|r,o=i-1;)da.call(t,o,1);return t}function Sr(e,t,n){var r=[];if(!e||!e.length)return r;var i=-1,o=[],a=e.length;for(t=$n(t,n,3);++i-1:!!i&&zn(e,t,n)>-1}function ei(e,t,n){var r=Su(e)?st:Ht;return t=$n(t,n,3),r(e,t)}function ti(e,t){return ei(e,Ro(t))}function ni(e,t,n){var r=Su(e)?ut:Tt;return t=$n(t,n,3),r(e,function(e,n,r){return!t(e,n,r)})}function ri(e,t,n){if(n?Jn(e,t,n):null==t){e=cr(e);var r=e.length;return r>0?e[Kt(0,r-1)]:T}var i=-1,o=Gi(e),r=o.length,a=r-1;for(t=Ea(t<0?0:+t||0,r);++i0&&(n=t.apply(this,arguments)),e<=1&&(t=T),n}}function di(e,t,n){function r(){d&&ua(d),l&&ua(l),g=0,l=d=h=T}function i(t,n){n&&ua(n),l=d=h=T,t&&(g=gu(),c=e.apply(p,s),d||l||(s=p=T))}function o(){var e=t-(gu()-f);e<=0||e>t?i(h,l):d=pa(o,e)}function a(){i(m,d)}function u(){if(s=arguments,f=gu(),p=this,h=m&&(d||!y),v===!1)var n=y&&!d;else{l||y||(g=f);var r=v-(f-g),i=r<=0||r>v;i?(l&&(l=ua(l)),g=f,c=e.apply(p,s)):l||(l=pa(a,r))}return i&&d?d=ua(d):d||t===v||(d=pa(o,t)),n&&(i=!0,c=e.apply(p,s)),!i||d||l||(s=p=T),c}var s,l,c,f,p,d,h,g=0,v=!1,m=!0;if("function"!=typeof e)throw new Zo(U);if(t=t<0?0:+t||0,n===!0){var y=!0;m=!1}else Ri(n)&&(y=!!n.leading,v="maxWait"in n&&wa(+n.maxWait||0,t),m="trailing"in n?!!n.trailing:m);return u.cancel=r,u}function hi(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new Zo(U);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new hi.Cache,n}function gi(e){if("function"!=typeof e)throw new Zo(U); -return function(){return!e.apply(this,arguments)}}function vi(e){return pi(2,e)}function mi(e,t){if("function"!=typeof e)throw new Zo(U);return t=wa(t===T?e.length-1:+t||0,0),function(){for(var n=arguments,r=-1,i=wa(n.length-t,0),o=$o(i);++rt}function ki(e,t){return e>=t}function Ni(e){return b(e)&&Yn(e)&&ta.call(e,"callee")&&!ca.call(e,"callee")}function Ci(e){return e===!0||e===!1||b(e)&&ra.call(e)==V}function Ti(e){return b(e)&&ra.call(e)==Z}function Ai(e){return!!e&&1===e.nodeType&&b(e)&&!Bi(e)}function Si(e){return null==e||(Yn(e)&&(Su(e)||Fi(e)||Ni(e)||b(e)&&Di(e.splice))?!e.length:!Bu(e).length)}function ji(e,t,n,r){n="function"==typeof n?an(n,r,3):T;var i=n?n(e,t):T;return i===T?Lt(e,t,n):!!i}function Oi(e){return b(e)&&"string"==typeof e.message&&ra.call(e)==Y}function Mi(e){return"number"==typeof e&&_a(e)}function Di(e){return Ri(e)&&ra.call(e)==Q}function Ri(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Li(e,t,n,r){return n="function"==typeof n?an(n,r,3):T,It(e,Wn(t),n)}function Pi(e){return qi(e)&&e!=+e}function Ii(e){return null!=e&&(Di(e)?oa.test(ea.call(e)):b(e)&&Pe.test(e))}function Hi(e){return null===e}function qi(e){return"number"==typeof e||b(e)&&ra.call(e)==ee}function Bi(e){var t;if(!b(e)||ra.call(e)!=te||Ni(e)||!ta.call(e,"constructor")&&(t=e.constructor,"function"==typeof t&&!(t instanceof t)))return!1;var n;return jt(e,function(e,t){n=t}),n===T||ta.call(e,n)}function $i(e){return Ri(e)&&ra.call(e)==ne}function Fi(e){return"string"==typeof e||b(e)&&ra.call(e)==ie}function zi(e){return b(e)&&nr(e.length)&&!!We[ra.call(e)]}function Wi(e){return e===T}function Ui(e,t){return e0;++r=Ea(t,n)&&e=0&&e.indexOf(t,n)==n}function po(e){return e=l(e),e&&we.test(e)?e.replace(_e,g):e}function ho(e){return e=l(e),e&&je.test(e)?e.replace(Se,v):e||"(?:)"}function go(e,t,n){e=l(e),t=+t;var r=e.length;if(r>=t||!_a(t))return e;var i=(t-r)/2,o=ya(i),a=va(i);return n=Dn("",a,n),n.slice(0,o)+e+n}function vo(e,t,n){return(n?Jn(e,t,n):null==t)?t=0:t&&(t=+t),e=_o(e),Na(e,t||(Le.test(e)?16:10))}function mo(e,t){var n="";if(e=l(e),t=+t,t<1||!e||!_a(t))return n;do t%2&&(n+=e),t=ya(t/2),e+=e;while(t);return n}function yo(e,t,n){return e=l(e),n=null==n?0:Ea(n<0?0:+n||0,e.length),e.lastIndexOf(t,n)==n}function bo(e,n,r){var i=t.templateSettings;r&&Jn(e,n,r)&&(n=r=T),e=l(e),n=vt(mt({},r||n),i,gt);var o,a,u=vt(mt({},n.imports),i.imports,gt),s=Bu(u),c=en(u,s),f=0,p=n.interpolate||qe,d="__p += '",h=Xo((n.escape||qe).source+"|"+p.source+"|"+(p===Ne?De:qe).source+"|"+(n.evaluate||qe).source+"|$","g"),g="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++ze+"]")+"\n";e.replace(h,function(t,n,r,i,u,s){return r||(r=i),d+=e.slice(f,s).replace(Be,m),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),u&&(a=!0,d+="';\n"+u+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),f=s+t.length,t}),d+="';\n";var v=n.variable;v||(d="with (obj) {\n"+d+"\n}\n"),d=(a?d.replace(ve,""):d).replace(me,"$1").replace(ye,"$1;"),d="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var y=Yu(function(){return Wo(s,g+"return "+d).apply(T,c)});if(y.source=d,Oi(y))throw y;return y}function _o(e,t,n){var r=e;return(e=l(e))?(n?Jn(r,t,n):null==t)?e.slice(E(e),k(e)+1):(t+="",e.slice(c(e,t),f(e,t)+1)):e}function xo(e,t,n){var r=e;return e=l(e),e?(n?Jn(r,t,n):null==t)?e.slice(E(e)):e.slice(c(e,t+"")):e}function wo(e,t,n){var r=e;return e=l(e),e?(n?Jn(r,t,n):null==t)?e.slice(0,k(e)+1):e.slice(0,f(e,t+"")+1):e}function Eo(e,t,n){n&&Jn(e,t,n)&&(t=T);var r=H,i=q;if(null!=t)if(Ri(t)){var o="separator"in t?t.separator:o;r="length"in t?+t.length||0:r,i="omission"in t?l(t.omission):i}else r=+t||0;if(e=l(e),r>=e.length)return e;var a=r-i.length;if(a<1)return i;var u=e.slice(0,a);if(null==o)return u+i;if($i(o)){if(e.slice(a).search(o)){var s,c,f=e.slice(0,a);for(o.global||(o=Xo(o.source,(Re.exec(o)||"")+"g")),o.lastIndex=0;s=o.exec(f);)c=s.index;u=u.slice(0,null==c?a:c)}}else if(e.indexOf(o,a)!=a){var p=u.lastIndexOf(o);p>-1&&(u=u.slice(0,p))}return u+i}function ko(e){return e=l(e),e&&xe.test(e)?e.replace(be,N):e}function No(e,t,n){return n&&Jn(e,t,n)&&(t=T),e=l(e),e.match(t||$e)||[]}function Co(e,t,n){return n&&Jn(e,t,n)&&(t=T),b(e)?So(e):_t(e,t)}function To(e){return function(){return e}}function Ao(e){return e}function So(e){return qt(xt(e,!0))}function jo(e,t){return Bt(e,xt(t,!0))}function Oo(e,t,n){if(null==n){var r=Ri(t),i=r?Bu(t):T,o=i&&i.length?Dt(t,i):T;(o?o.length:r)||(o=!1,n=t,t=e,e=this)}o||(o=Dt(t,Bu(t)));var a=!0,u=-1,s=Di(e),l=o.length;n===!1?a=!1:Ri(n)&&"chain"in n&&(a=n.chain);for(;++u>>1,Ma=9007199254740991,Da=ga&&new ga,Ra={};t.support={};t.templateSettings={escape:Ee,evaluate:ke,interpolate:Ne,variable:"",imports:{_:t}};var La=function(){function e(){}return function(t){if(Ri(t)){e.prototype=t;var n=new e;e.prototype=T}return n||{}}}(),Pa=pn(Ot),Ia=pn(Mt,!0),Ha=dn(),qa=dn(!0),Ba=Da?function(e,t){return Da.set(e,t),e}:Ao,$a=Da?function(e){return Da.get(e)}:Do,Fa=zt("length"),za=function(){var e=0,t=0;return function(n,r){var i=gu(),o=$-(i-t);if(t=i,o>0){if(++e>=B)return n}else e=0;return Ba(n,r)}}(),Wa=mi(function(e,t){return b(e)&&Yn(e)?Et(e,St(t,!1,!0)):[]}),Ua=wn(),Ka=wn(!0),Ga=mi(function(e){for(var t=e.length,n=t,r=$o(f),i=zn(),o=i==u,a=[];n--;){var s=e[n]=Yn(s=e[n])?s:[];r[n]=o&&s.length>=120?gn(n&&s):null}var l=e[0],c=-1,f=l?l.length:0,p=r[0];e:for(;++c2?e[t-2]:T,r=t>1?e[t-1]:T;return t>2&&"function"==typeof n?t-=2:(n=t>1&&"function"==typeof r?(--t,r):T,r=T),e.length=t,Hr(e,n,r)}),tu=mi(function(e){return e=St(e),this.thru(function(t){return Je(Su(t)?t:[fr(t)],e)})}),nu=mi(function(e,t){return yt(e,St(t))}),ru=cn(function(e,t,n){ta.call(e,n)?++e[n]:e[n]=1}),iu=xn(Pa),ou=xn(Ia,!0),au=Nn(tt,Pa),uu=Nn(nt,Ia),su=cn(function(e,t,n){ta.call(e,n)?e[n].push(t):e[n]=[t]}),lu=cn(function(e,t,n){e[n]=t}),cu=mi(function(e,t,n){var r=-1,i="function"==typeof t,o=er(t),a=Yn(e)?$o(e.length):[];return Pa(e,function(e){var u=i?t:o&&null!=e?e[t]:T;a[++r]=u?u.apply(e,n):Zn(e,t,n)}),a}),fu=cn(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),pu=On(ct,Pa),du=On(ft,Ia),hu=mi(function(e,t){if(null==e)return[];var n=t[2];return n&&Jn(t[0],t[1],n)&&(t.length=1),Yt(e,St(t),[])}),gu=ka||function(){return(new Fo).getTime()},vu=mi(function(e,t,n){var r=S;if(n.length){var i=x(n,vu.placeholder);r|=R}return In(e,r,t,n,i)}),mu=mi(function(e,t){t=t.length?St(t):Zi(e);for(var n=-1,r=t.length;++n0||t<0)?new i(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==T&&(t=+t||0,n=t<0?n.dropRight(-t):n.take(t-e)),n)},i.prototype.takeRightWhile=function(e,t){return this.reverse().takeWhile(e,t).reverse()},i.prototype.toArray=function(){return this.take(Aa)},Ot(i.prototype,function(e,n){var o=/^(?:filter|map|reject)|While$/.test(n),a=/^(?:first|last)$/.test(n),u=t[a?"take"+("last"==n?"Right":""):n];u&&(t.prototype[n]=function(){var t=a?[1]:arguments,n=this.__chain__,s=this.__wrapped__,l=!!this.__actions__.length,c=s instanceof i,f=t[0],p=c||Su(s);p&&o&&"function"==typeof f&&1!=f.length&&(c=p=!1);var d=function(e){return a&&n?u(e,1)[0]:u.apply(T,lt([e],t))},h={func:zr,args:[d],thisArg:T},g=c&&!l;if(a&&!n)return g?(s=s.clone(),s.__actions__.push(h),e.call(s)):u.call(T,this.value())[0];if(!a&&p){s=g?s:new i(this);var v=e.apply(s,t);return v.__actions__.push(h),new r(v,n)}return this.thru(d)})}),tt(["join","pop","push","replace","shift","sort","splice","split","unshift"],function(e){var n=(/^(?:replace|split)$/.test(e)?Jo:Yo)[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:join|pop|replace|shift)$/.test(e);t.prototype[e]=function(){var e=arguments;return i&&!this.__chain__?n.apply(this.value(),e):this[r](function(t){return n.apply(t,e)})}}),Ot(i.prototype,function(e,n){var r=t[n];if(r){var i=r.name,o=Ra[i]||(Ra[i]=[]);o.push({name:n,func:r})}}),Ra[Mn(T,j).name]=[{name:"wrapper",func:T}],i.prototype.clone=_,i.prototype.reverse=J,i.prototype.value=re,t.prototype.chain=Wr,t.prototype.commit=Ur,t.prototype.concat=tu,t.prototype.plant=Kr,t.prototype.reverse=Gr,t.prototype.toString=Xr,t.prototype.run=t.prototype.toJSON=t.prototype.valueOf=t.prototype.value=Vr,t.prototype.collect=t.prototype.map,t.prototype.head=t.prototype.first,t.prototype.select=t.prototype.filter,t.prototype.tail=t.prototype.rest,t}var T,A="3.10.1",S=1,j=2,O=4,M=8,D=16,R=32,L=64,P=128,I=256,H=30,q="...",B=150,$=16,F=200,z=1,W=2,U="Expected a function",K="__lodash_placeholder__",G="[object Arguments]",X="[object Array]",V="[object Boolean]",Z="[object Date]",Y="[object Error]",Q="[object Function]",J="[object Map]",ee="[object Number]",te="[object Object]",ne="[object RegExp]",re="[object Set]",ie="[object String]",oe="[object WeakMap]",ae="[object ArrayBuffer]",ue="[object Float32Array]",se="[object Float64Array]",le="[object Int8Array]",ce="[object Int16Array]",fe="[object Int32Array]",pe="[object Uint8Array]",de="[object Uint8ClampedArray]",he="[object Uint16Array]",ge="[object Uint32Array]",ve=/\b__p \+= '';/g,me=/\b(__p \+=) '' \+/g,ye=/(__e\(.*?\)|\b__t\)) \+\n'';/g,be=/&(?:amp|lt|gt|quot|#39|#96);/g,_e=/[&<>"'`]/g,xe=RegExp(be.source),we=RegExp(_e.source),Ee=/<%-([\s\S]+?)%>/g,ke=/<%([\s\S]+?)%>/g,Ne=/<%=([\s\S]+?)%>/g,Ce=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,Te=/^\w*$/,Ae=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,Se=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,je=RegExp(Se.source),Oe=/[\u0300-\u036f\ufe20-\ufe23]/g,Me=/\\(\\)?/g,De=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Re=/\w*$/,Le=/^0[xX]/,Pe=/^\[object .+?Constructor\]$/,Ie=/^\d+$/,He=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,qe=/($^)/,Be=/['\n\r\u2028\u2029\\]/g,$e=function(){var e="[A-Z\\xc0-\\xd6\\xd8-\\xde]",t="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(e+"+(?="+e+t+")|"+e+"?"+t+"|"+e+"+|[0-9]+","g")}(),Fe=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"],ze=-1,We={};We[ue]=We[se]=We[le]=We[ce]=We[fe]=We[pe]=We[de]=We[he]=We[ge]=!0,We[G]=We[X]=We[ae]=We[V]=We[Z]=We[Y]=We[Q]=We[J]=We[ee]=We[te]=We[ne]=We[re]=We[ie]=We[oe]=!1;var Ue={};Ue[G]=Ue[X]=Ue[ae]=Ue[V]=Ue[Z]=Ue[ue]=Ue[se]=Ue[le]=Ue[ce]=Ue[fe]=Ue[ee]=Ue[te]=Ue[ne]=Ue[ie]=Ue[pe]=Ue[de]=Ue[he]=Ue[ge]=!0,Ue[Y]=Ue[Q]=Ue[J]=Ue[re]=Ue[oe]=!1;var Ke={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Ge={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Xe={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Ve={"function":!0,object:!0},Ze={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Ye={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Qe=Ve[typeof t]&&t&&!t.nodeType&&t,Je=Ve[typeof e]&&e&&!e.nodeType&&e,et=Qe&&Je&&"object"==typeof i&&i&&i.Object&&i,tt=Ve[typeof self]&&self&&self.Object&&self,nt=Ve[typeof window]&&window&&window.Object&&window,rt=(Je&&Je.exports===Qe&&Qe,et||nt!==(this&&this.window)&&nt||tt||this),it=C();rt._=it,r=function(){return it}.call(t,n,t,e),!(r!==T&&(e.exports=r))}).call(this)}).call(t,n(88)(e),function(){return this}())},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(){f.addClass(p);try{localStorage.setItem(p,!0)}catch(e){}}function i(){f.removeClass(p);try{localStorage.removeItem(p)}catch(e){}}function o(){try{localStorage.getItem(p)&&r()}catch(e){}}function a(){f.hasClass(p)?i():r()}function u(){o(),d.click(function(){a()})}var s=n(1)["default"];Object.defineProperty(t,"__esModule",{value:!0}),t.initialize=u;var l=n(2),c=s(l),f=(0,c["default"])("body"),p="night-mode",d=(0,c["default"])(".night-mode-toggle")}]); -//# sourceMappingURL=app-778c9ef903.js.map diff --git a/doc/dist/app-c922dbe7ef.css b/doc/dist/app-c922dbe7ef.css deleted file mode 100644 index 2c53d68a..00000000 --- a/doc/dist/app-c922dbe7ef.css +++ /dev/null @@ -1 +0,0 @@ -@import url(https://fonts.googleapis.com/css?family=Lato:300,700|Merriweather:300italic,300|Inconsolata:400,700);.hljs,article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}img,legend{border:0}#search ul,.sidebar ul{list-style:none}.night-mode-toggle:focus,.sidebar .sidebar-search .search-input:focus,.sidebar .sidebar-search .search-input:hover,.sidebar-toggle:active,.sidebar-toggle:focus,.sidebar-toggle:hover,a:active,a:hover{outline:0}.hljs-comment{color:#8e908c}.css .hljs-class,.css .hljs-id,.css .hljs-pseudo,.hljs-attribute,.hljs-regexp,.hljs-tag,.hljs-variable,.html .hljs-doctype,.ruby .hljs-constant,.xml .hljs-doctype,.xml .hljs-pi,.xml .hljs-tag .hljs-title{color:#c82829}.hljs-built_in,.hljs-constant,.hljs-literal,.hljs-number,.hljs-params,.hljs-pragma,.hljs-preprocessor{color:#f5871f}.css .hljs-rule .hljs-attribute,.ruby .hljs-class .hljs-title{color:#eab700}.hljs-header,.hljs-inheritance,.hljs-name,.hljs-string,.hljs-value,.ruby .hljs-symbol,.xml .hljs-cdata{color:#718c00}.css .hljs-hexcolor,.hljs-title{color:#3e999f}.coffeescript .hljs-title,.hljs-function,.javascript .hljs-title,.perl .hljs-sub,.python .hljs-decorator,.python .hljs-title,.ruby .hljs-function .hljs-title,.ruby .hljs-title .hljs-keyword{color:#4271ae}.hljs-keyword,.javascript .hljs-function{color:#8959a8}.hljs{overflow-x:auto;background:#fff;color:#4d4d4c;padding:.5em;-webkit-text-size-adjust:none}legend,td,th{padding:0}.coffeescript .javascript,.javascript .xml,.tex .hljs-formula,.xml .css,.xml .hljs-cdata,.xml .javascript,.xml .vbscript{opacity:.5}/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}abbr[title]{border-bottom:1px dotted}b,optgroup,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}.content-outer,body{background-color:#fff}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre,textarea{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}table{border-collapse:collapse;border-spacing:0}@font-face{font-family:icomoon;src:url(../fonts/icomoon.eot?h5z89e);src:url(../fonts/icomoon.eot?#iefixh5z89e) format('embedded-opentype'),url(../fonts/icomoon.ttf?h5z89e) format('truetype'),url(../fonts/icomoon.woff?h5z89e) format('woff'),url(../fonts/icomoon.svg?h5z89e#icomoon) format('svg');font-weight:400;font-style:normal}.icon-elem,[class*=" icon-"],[class^=icon-]{font-family:icomoon;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.sidebar,body{font-family:Lato,sans-serif}.icon-link:before{content:"\e005"}.icon-search:before{content:"\e036"}.icon-cross:before{content:"\e117"}@media screen and (max-width:768px){.icon-menu{font-size:1em}}@media screen and (min-width:769px){.icon-menu{font-size:1.25em}}@media screen and (min-width:1281px){.icon-menu{font-size:1.5em}}.icon-menu:before{content:"\e120"}.icon-angle-right:before{content:"\f105"}.icon-code:before{content:"\f121"}body,html{box-sizing:border-box;height:100%;width:100%}body{margin:0;font-size:16px;line-height:1.6875em}*,:after,:before{box-sizing:inherit}.main{display:-ms-flexbox;display:-ms-flex;display:flex;-ms-flex-pack:end;justify-content:flex-end}.sidebar{display:-ms-flexbox;display:-ms-flex;display:flex;min-height:0;-moz-flex-direction:column;-ms-flex-direction:column;flex-direction:column;width:300px;height:100%;position:fixed;top:0;left:0;z-index:4}.content{width:100%;padding-left:300px;overflow-y:auto;-webkit-overflow-scrolling:touch;height:100%;position:relative;z-index:3}@media screen and (max-width:768px){body .content{z-index:0;padding-left:0}body .sidebar{z-index:3;transform:translateX(-102%);will-change:transform}}body.sidebar-closed .sidebar,body.sidebar-closing .sidebar,body.sidebar-opening .sidebar{z-index:0}body.sidebar-opened .sidebar-toggle,body.sidebar-opening .sidebar-toggle{transform:translateX(250px)}@media screen and (max-width:768px){body.sidebar-opened .sidebar,body.sidebar-opening .sidebar{transform:translateX(0)}}body.sidebar-closed .content,body.sidebar-closing .content{padding-left:0}body.sidebar-closed .sidebar-toggle,body.sidebar-closing .sidebar-toggle{transform:none}body.sidebar-closed .sidebar-toggle{color:#000}body.sidebar-opening .sidebar-toggle{transition:transform .3s ease-in-out}body.sidebar-opening .content{padding-left:300px;transition:padding-left .3s ease-in-out}@media screen and (max-width:768px){body.sidebar-opening .content{padding-left:0}body.sidebar-opening .sidebar{transition:transform .3s ease-in-out;z-index:3}}body.sidebar-closing .sidebar-toggle{transition:transform .3s ease-in-out}body.sidebar-closing .content{transition:padding-left .3s ease-in-out}@media screen and (max-width:768px){body.sidebar-closing .sidebar{z-index:3;transition:transform .3s ease-in-out;transform:translateX(-102%)}}.sidebar a,.sidebar-toggle{transition:color .3s ease-in-out}body.sidebar-closed .sidebar{visibility:hidden}.content-inner{max-width:949px;margin:0 auto;padding:3px 60px}.content-outer{min-height:100%}@media screen and (max-width:768px){.content-inner{padding:27px 20px 27px 40px}}.sidebar-toggle{position:fixed;z-index:99;left:18px;top:8px;color:#e1e1e1;background-color:transparent;border:none;padding:0;font-size:16px;will-change:transform;transform:translateX(250px)}.sidebar-toggle:hover{color:#e1e1e1}@media screen and (max-width:768px){.sidebar-toggle{transform:translateX(0);left:5px;top:5px}.sidebar-opened .sidebar-toggle{left:18px;top:5px}}.sidebar{font-size:15px;line-height:18px;background:#373f52;color:#d5dae6;overflow:hidden}.sidebar .gradient{background:linear-gradient(#373f52,rgba(55,63,82,0));height:20px;margin-top:-20px;pointer-events:none;position:relative;top:20px;z-index:100}.sidebar ul li{margin:0;padding:0 10px}.sidebar a{color:#d5dae6;text-decoration:none}.sidebar a:hover{color:#fff}.sidebar .sidebar-projectLink{margin:18px 30px 0}.sidebar .sidebar-projectDetails{display:inline-block;text-align:right;vertical-align:top;margin-top:6px}.sidebar .sidebar-projectImage{display:inline-block;max-width:64px;max-height:64px;margin-left:15px;vertical-align:bottom}.sidebar .sidebar-projectName{font-weight:700;font-size:24px;line-height:30px;color:#fff;margin:0;padding:0;max-width:230px;word-wrap:break-word}.sidebar .sidebar-projectVersion{margin:0;padding:0;font-weight:300;font-size:16px;line-height:20px;color:#fff}.sidebar .sidebar-listNav{padding:10px 30px 20px;margin:0}.sidebar .sidebar-listNav li,.sidebar .sidebar-listNav li a{text-transform:uppercase;font-weight:300;font-size:14px}.sidebar .sidebar-listNav li{padding-left:17px;border-left:3px solid transparent;transition:all .3s linear;line-height:27px}.sidebar .sidebar-listNav li.selected,.sidebar .sidebar-listNav li.selected a,.sidebar .sidebar-listNav li:hover,.sidebar .sidebar-listNav li:hover a{border-color:#9768d1;color:#fff}.sidebar .sidebar-search{margin:18px 30px;display:-ms-flexbox;display:-ms-flex;display:flex}.sidebar .sidebar-search .search-button:hover,.sidebar .sidebar-search.selected .search-button{color:#9768d1}.sidebar .sidebar-search .search-button{font-size:14px;color:#d5dae6;background-color:transparent;border:none;padding:2px 0 0;margin:0}.sidebar .sidebar-search .search-input{background-color:transparent;border:none;border-radius:0;border-bottom:1px solid #959595;margin-left:5px;height:20px}.sidebar .sidebar-search .icon-search{font-weight:700}.sidebar #full-list{margin:0 0 0 30px;padding:10px 20px 40px;overflow-y:auto;-webkit-overflow-scrolling:touch;-moz-flex:1 1 .01%;-ms-flex:1 1 .01%;flex:1 1 .01%;-ms-flex-positive:1;-ms-flex-negative:1;-ms-flex-preferred-size:.01%}.sidebar #full-list ul{display:none;margin:9px 15px;padding:0}.sidebar #full-list ul li{font-weight:300;line-height:18px;padding:2px 10px}.sidebar #full-list ul li a.expand:before{content:"+";font-family:monospaced;font-size:15px;float:left;width:13px;margin-left:-13px}.sidebar #full-list ul li.open a.expand:before{content:"−"}.sidebar #full-list ul li ul{display:none;margin:9px 6px}.sidebar #full-list li.open>ul,.sidebar #full-list ul li.open>ul{display:block}.sidebar #full-list ul li ul li{border-left:1px solid #959595;padding:0 10px}.sidebar #full-list ul li ul li.active:before{font-family:icomoon;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\f105";margin-left:-10px;font-size:16px;margin-right:5px}.sidebar #full-list li{padding:0;line-height:27px}.sidebar #full-list li.active{border-left:none}.sidebar #full-list li.active>a,.sidebar #full-list li.clicked>a{color:#fff}.sidebar #full-list li.group{text-transform:uppercase;font-weight:700;font-size:.8em;margin:2em 0 0;line-height:1.8em;color:#ddd}@media screen and (max-height:500px){.sidebar{overflow-y:auto}.sidebar #full-list{overflow:visible}}.content-inner{font-family:Merriweather,'Book Antiqua',Georgia,'Century Schoolbook',serif;font-size:1em;line-height:1.6875em}.content-inner h1,.content-inner h2,.content-inner h3,.content-inner h4,.content-inner h5,.content-inner h6{font-family:Lato,sans-serif;font-weight:700;line-height:1.5em;word-wrap:break-word}.content-inner h1{font-size:2em;margin:1em 0 .5em}.content-inner h1.section-heading{margin:1.5em 0 .5em}.content-inner h1 small{font-weight:300}.content-inner h1 a.view-source{font-size:1.2rem}.content-inner h2{font-size:1.6em;margin:1em 0 .5em;font-weight:700}.content-inner h3{font-size:1.375em;margin:1em 0 .5em;font-weight:700}.content-inner a{color:#000;text-decoration:none;text-shadow:.03em 0 #fff,-.03em 0 #fff,0 .03em #fff,0 -.03em #fff,.06em 0 #fff,-.06em 0 #fff,.09em 0 #fff,-.09em 0 #fff,.12em 0 #fff,-.12em 0 #fff,.15em 0 #fff,-.15em 0 #fff;background-image:linear-gradient(#fff,#fff),linear-gradient(#fff,#fff),linear-gradient(#000,#000);background-size:.05em 1px,.05em 1px,1px 1px;background-repeat:no-repeat,no-repeat,repeat-x;background-position:0 90%,100% 90%,0 90%}.content-inner a:selection{text-shadow:.03em 0 #b4d5fe,-.03em 0 #b4d5fe,0 .03em #b4d5fe,0 -.03em #b4d5fe,.06em 0 #b4d5fe,-.06em 0 #b4d5fe,.09em 0 #b4d5fe,-.09em 0 #b4d5fe,.12em 0 #b4d5fe,-.12em 0 #b4d5fe,.15em 0 #b4d5fe,-.15em 0 #b4d5fe;background:#b4d5fe}.content-inner a:-moz-selection{text-shadow:.03em 0 #b4d5fe,-.03em 0 #b4d5fe,0 .03em #b4d5fe,0 -.03em #b4d5fe,.06em 0 #b4d5fe,-.06em 0 #b4d5fe,.09em 0 #b4d5fe,-.09em 0 #b4d5fe,.12em 0 #b4d5fe,-.12em 0 #b4d5fe,.15em 0 #b4d5fe,-.15em 0 #b4d5fe;background:#b4d5fe}.content-inner a *,.content-inner a :after,.content-inner a :before,.content-inner a:after,.content-inner a:before{text-shadow:none}.content-inner a:visited{color:#000}.content-inner ul li{line-height:1.5em}.content-inner ul li>p{margin:0}.content-inner a.view-source{float:right;color:#959595;background:0 0;border:none;text-shadow:none;transition:color .3s ease-in-out;margin-top:1px}.content-inner a.view-source:hover{color:#373f52}.content-inner .note{color:#959595;margin:0 5px;font-size:14px;font-weight:400}.content-inner blockquote{font-style:italic;margin:.5em 0;padding:.25em 1.5em;border-left:3px solid #e1e1e1;display:inline-block}.content-inner blockquote :first-child{padding-top:0;margin-top:0}.content-inner blockquote :last-child{padding-bottom:0;margin-bottom:0}.content-inner table{margin:2em 0}.content-inner th{text-align:left;font-family:Lato,sans-serif;text-transform:uppercase;font-weight:700;padding-bottom:.5em}.content-inner tr{border-bottom:1px solid #d5dae6;vertical-align:bottom;height:2.5em}.content-inner .summary .summary-row .summary-signature a,.content-inner .summary h2 a{background:0 0;border:none;text-shadow:none}.content-inner td,.content-inner th{padding-left:1em;line-height:2em}.content-inner .section-heading:hover a.hover-link{opacity:1;text-decoration:none}.content-inner .section-heading a.hover-link{transition:opacity .3s ease-in-out;display:inline-block;opacity:0;padding:.3em .6em .6em;line-height:1em;margin-left:-2.7em;background:0 0;border:none;text-shadow:none;font-size:16px;vertical-align:middle}.content-inner .detail h2.section-heading{margin:1.5em 0 .5em .3em}.content-inner .visible-xs{display:none!important}@media screen and (max-width:768px){.content-inner .visible-xs{display:block!important}}.content-inner img{max-width:100%}.content-inner .summary h2{font-weight:700}.content-inner .summary .summary-row .summary-signature{font-family:Inconsolata,Menlo,Courier,monospace;font-weight:700}.content-inner .summary .summary-row .summary-synopsis{font-family:Merriweather,'Book Antiqua',Georgia,'Century Schoolbook',serif;font-style:italic;padding:0 1.2em;margin:0 0 .5em}.content-inner .summary .summary-row .summary-synopsis p{margin:0;padding:0}@keyframes blink-background{from{background-color:#f7f7f7}to{background-color:#ff9}}.content-inner .detail:target .detail-header{animation-duration:.55s;animation-name:blink-background;animation-iteration-count:1;animation-timing-function:ease-in-out}.content-inner .detail-header{margin:2em 0 1em;padding:.5em 1em;background:#f7f7f7;border-left:3px solid #9768d1;font-size:1em;font-family:Inconsolata,Menlo,Courier,monospace;position:relative}.content-inner .detail-header .note{float:right}.content-inner .detail-header .signature{font-size:1rem;font-weight:700}.content-inner .detail-header:hover a.detail-link{opacity:1;text-decoration:none}.content-inner .detail-header a.detail-link{transition:opacity .3s ease-in-out;position:absolute;top:0;left:0;display:block;opacity:0;padding:.6em;line-height:1.5em;margin-left:-2.5em;background:0 0;border:none;text-shadow:none}#search h1,.content-inner .footer .line{display:inline-block}.content-inner .specs pre,.content-inner code{font-family:Inconsolata,Menlo,Courier,monospace;font-style:normal;line-height:24px}.content-inner .specs{opacity:.7;padding-bottom:.05em}.content-inner .specs pre{font-size:.9em;white-space:pre-wrap;margin:0;padding:0}.content-inner .docstring{margin:1.2em 0 2.1em 1.2em}.content-inner .docstring h2,.content-inner .docstring h3,.content-inner .docstring h4,.content-inner .docstring h5{font-weight:700}.content-inner .docstring h2{font-size:1em}.content-inner .docstring h3{font-size:.95em}.content-inner .docstring h4{font-size:.9em}.content-inner .docstring h5{font-size:.85em}.content-inner a.no-underline,.content-inner pre a{color:#9768d1;text-shadow:none;text-decoration:none;background-image:none}.content-inner a.no-underline:active,.content-inner a.no-underline:focus,.content-inner a.no-underline:hover,.content-inner a.no-underline:visited,.content-inner pre a:active,.content-inner pre a:focus,.content-inner pre a:hover,.content-inner pre a:visited{color:#9768d1;text-decoration:none}.content-inner code{font-weight:400;background-color:#f7f9fc;vertical-align:baseline;border-radius:2px;padding:.1em .2em;border:1px solid #d2ddee}.content-inner pre{margin:1.5em 0}.content-inner pre.spec{margin:0}.content-inner pre.spec code{padding:0}.content-inner pre code.hljs{white-space:inherit;padding:.5em 1em;background-color:#f7f9fc}.content-inner .footer{margin:4em auto 1em;text-align:center;font-style:italic;font-size:14px;color:#959595}.content-inner .footer a{color:#959595;text-decoration:none;text-shadow:.03em 0 #fff,-.03em 0 #fff,0 .03em #fff,0 -.03em #fff,.06em 0 #fff,-.06em 0 #fff,.09em 0 #fff,-.09em 0 #fff,.12em 0 #fff,-.12em 0 #fff,.15em 0 #fff,-.15em 0 #fff;background-image:linear-gradient(#fff,#fff),linear-gradient(#fff,#fff),linear-gradient(#959595,#959595);background-size:.05em 1px,.05em 1px,1px 1px;background-repeat:no-repeat,no-repeat,repeat-x;background-position:0 90%,100% 90%,0 90%}.content-inner .footer a:selection{text-shadow:.03em 0 #b4d5fe,-.03em 0 #b4d5fe,0 .03em #b4d5fe,0 -.03em #b4d5fe,.06em 0 #b4d5fe,-.06em 0 #b4d5fe,.09em 0 #b4d5fe,-.09em 0 #b4d5fe,.12em 0 #b4d5fe,-.12em 0 #b4d5fe,.15em 0 #b4d5fe,-.15em 0 #b4d5fe;background:#b4d5fe}.content-inner .footer a:-moz-selection{text-shadow:.03em 0 #b4d5fe,-.03em 0 #b4d5fe,0 .03em #b4d5fe,0 -.03em #b4d5fe,.06em 0 #b4d5fe,-.06em 0 #b4d5fe,.09em 0 #b4d5fe,-.09em 0 #b4d5fe,.12em 0 #b4d5fe,-.12em 0 #b4d5fe,.15em 0 #b4d5fe,-.15em 0 #b4d5fe;background:#b4d5fe}.content-inner .footer a *,.content-inner .footer a :after,.content-inner .footer a :before,.content-inner .footer a:after,.content-inner .footer a:before{text-shadow:none}.content-inner .footer a:visited{color:#959595}#search{min-height:200px}#search .result-id{font-size:1.2em}#search .result-id a{text-shadow:none;background-image:none;transition:color .3s ease-in-out}#search .result-id a:active,#search .result-id a:focus,#search .result-id a:visited{color:#000}#search .result-id a:hover{color:#9768d1}#search .result-elem em,#search .result-id em{font-style:normal;color:#9768d1}#search ul{margin:0;padding:0}.night-mode-toggle{background:0 0;border:none}.night-mode-toggle:after{font-size:12px;content:'Switch to night mode';text-decoration:underline}body.night-mode{background:#212127}body.night-mode .hljs-comment{color:#969896}body.night-mode .css .hljs-class,body.night-mode .css .hljs-id,body.night-mode .css .hljs-pseudo,body.night-mode .hljs-attribute,body.night-mode .hljs-regexp,body.night-mode .hljs-tag,body.night-mode .hljs-variable,body.night-mode .html .hljs-doctype,body.night-mode .ruby .hljs-constant,body.night-mode .xml .hljs-doctype,body.night-mode .xml .hljs-pi,body.night-mode .xml .hljs-tag .hljs-title{color:#c66}body.night-mode .hljs-built_in,body.night-mode .hljs-constant,body.night-mode .hljs-literal,body.night-mode .hljs-number,body.night-mode .hljs-params,body.night-mode .hljs-pragma,body.night-mode .hljs-preprocessor{color:#de935f}body.night-mode .css .hljs-rule .hljs-attribute,body.night-mode .ruby .hljs-class .hljs-title{color:#f0c674}body.night-mode .hljs-header,body.night-mode .hljs-inheritance,body.night-mode .hljs-name,body.night-mode .hljs-string,body.night-mode .hljs-value,body.night-mode .ruby .hljs-symbol,body.night-mode .xml .hljs-cdata{color:#b5bd68}body.night-mode .css .hljs-hexcolor,body.night-mode .hljs-title{color:#8abeb7}body.night-mode .coffeescript .hljs-title,body.night-mode .hljs-function,body.night-mode .javascript .hljs-title,body.night-mode .perl .hljs-sub,body.night-mode .python .hljs-decorator,body.night-mode .python .hljs-title,body.night-mode .ruby .hljs-function .hljs-title,body.night-mode .ruby .hljs-title .hljs-keyword{color:#81a2be}body.night-mode .hljs-keyword,body.night-mode .javascript .hljs-function{color:#b294bb}body.night-mode .hljs{display:block;overflow-x:auto;background:#1d1f21;color:#c5c8c6;padding:.5em;-webkit-text-size-adjust:none}body.night-mode .coffeescript .javascript,body.night-mode .javascript .xml,body.night-mode .tex .hljs-formula,body.night-mode .xml .css,body.night-mode .xml .hljs-cdata,body.night-mode .xml .javascript,body.night-mode .xml .vbscript{opacity:.5}body.night-mode .content-outer{background:#212127}body.night-mode .night-mode-toggle:after{color:#959595;content:'Switch to day mode';text-decoration:underline}body.night-mode #search .result-id a:active,body.night-mode #search .result-id a:focus,body.night-mode #search .result-id a:visited{color:#D2D2D2}body.night-mode #search .result-id a:hover{color:#9768d1}body.night-mode .content-inner{color:#B4B4B4}body.night-mode .content-inner a:visited,body.night-mode .content-inner h1,body.night-mode .content-inner h2,body.night-mode .content-inner h3,body.night-mode .content-inner h4,body.night-mode .content-inner h5,body.night-mode .content-inner h6{color:#D2D2D2}body.night-mode .content-inner a{color:#D2D2D2;text-decoration:none;text-shadow:.03em 0 #212127,-.03em 0 #212127,0 .03em #212127,0 -.03em #212127,.06em 0 #212127,-.06em 0 #212127,.09em 0 #212127,-.09em 0 #212127,.12em 0 #212127,-.12em 0 #212127,.15em 0 #212127,-.15em 0 #212127;background-image:linear-gradient(#212127,#212127),linear-gradient(#212127,#212127),linear-gradient(#D2D2D2,#D2D2D2);background-size:.05em 1px,.05em 1px,1px 1px;background-repeat:no-repeat,no-repeat,repeat-x;background-position:0 90%,100% 90%,0 90%}body.night-mode .content-inner a:selection{text-shadow:.03em 0 #b4d5fe,-.03em 0 #b4d5fe,0 .03em #b4d5fe,0 -.03em #b4d5fe,.06em 0 #b4d5fe,-.06em 0 #b4d5fe,.09em 0 #b4d5fe,-.09em 0 #b4d5fe,.12em 0 #b4d5fe,-.12em 0 #b4d5fe,.15em 0 #b4d5fe,-.15em 0 #b4d5fe;background:#b4d5fe}body.night-mode .content-inner a:-moz-selection{text-shadow:.03em 0 #b4d5fe,-.03em 0 #b4d5fe,0 .03em #b4d5fe,0 -.03em #b4d5fe,.06em 0 #b4d5fe,-.06em 0 #b4d5fe,.09em 0 #b4d5fe,-.09em 0 #b4d5fe,.12em 0 #b4d5fe,-.12em 0 #b4d5fe,.15em 0 #b4d5fe,-.15em 0 #b4d5fe;background:#b4d5fe}body.night-mode .content-inner a *,body.night-mode .content-inner a :after,body.night-mode .content-inner a :before,body.night-mode .content-inner a:after,body.night-mode .content-inner a:before{text-shadow:none}body.night-mode .content-inner a.no-underline{text-shadow:none;background-image:none}body.night-mode .content-inner .summary h2 a,body.night-mode .content-inner a.view-source{background:0 0;text-shadow:none}body.night-mode .content-inner a.view-source:hover{color:#fff}@keyframes night-blink-background{from{background-color:#3A4152}to{background-color:#660}}body.night-mode .content-inner .detail:target .detail-header{animation-name:night-blink-background}body.night-mode .content-inner .detail-header{background:#3A4152;color:#D2D2D2}body.night-mode .content-inner code{background-color:#2C2C31;border-color:#44444c}body.night-mode .content-inner pre code.hljs{background-color:#2C2C31}body.night-mode .content-inner pre a{text-shadow:none;background-image:none}body.night-mode .content-inner .footer{color:#959595}body.night-mode .content-inner .footer .line{display:inline-block}body.night-mode .content-inner .footer a{color:#959595;text-shadow:none;background-image:none;text-decoration:underline}body.night-mode .sidebar-closed .sidebar-toggle,body.night-mode .sidebar-toggle{color:#d5dae6}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}@media print{#sidebar{display:none}} \ No newline at end of file diff --git a/doc/dist/sidebar_items-a31106edb0.js b/doc/dist/sidebar_items-a31106edb0.js deleted file mode 100644 index 3eed149d..00000000 --- a/doc/dist/sidebar_items-a31106edb0.js +++ /dev/null @@ -1 +0,0 @@ -sidebarNodes={"extras":[{"id":"api-reference","title":"API Reference","group":"","headers":[{"id":"Modules","anchor":"modules"}]}],"exceptions":[],"modules":[{"id":"Kuber.Hex","title":"Kuber.Hex","group":"","functions":[{"id":"authorize/5","anchor":"authorize/5"},{"id":"capture/5","anchor":"capture/5"},{"id":"purchase/5","anchor":"purchase/5"},{"id":"refund/5","anchor":"refund/5"},{"id":"store/4","anchor":"store/4"},{"id":"unstore/5","anchor":"unstore/5"},{"id":"void/4","anchor":"void/4"}]},{"id":"Kuber.Hex.Adapter","title":"Kuber.Hex.Adapter","group":""},{"id":"Kuber.Hex.Address","title":"Kuber.Hex.Address","group":""},{"id":"Kuber.Hex.Application","title":"Kuber.Hex.Application","group":"","functions":[{"id":"start/2","anchor":"start/2"}]},{"id":"Kuber.Hex.CreditCard","title":"Kuber.Hex.CreditCard","group":""},{"id":"Kuber.Hex.Gateways.AuthorizeNet","title":"Kuber.Hex.Gateways.AuthorizeNet","group":"","functions":[{"id":"authenticate/1","anchor":"authenticate/1"},{"id":"authorize/3","anchor":"authorize/3"},{"id":"capture/2","anchor":"capture/2"},{"id":"capture/3","anchor":"capture/3"},{"id":"join_string/2","anchor":"join_string/2"},{"id":"purchase/3","anchor":"purchase/3"},{"id":"refund/3","anchor":"refund/3"},{"id":"store/2","anchor":"store/2"},{"id":"unstore/3","anchor":"unstore/3"},{"id":"validate_config/1","anchor":"validate_config/1"},{"id":"void/2","anchor":"void/2"}]},{"id":"Kuber.Hex.Gateways.Base","title":"Kuber.Hex.Gateways.Base","group":""},{"id":"Kuber.Hex.Gateways.Bogus","title":"Kuber.Hex.Gateways.Bogus","group":"","functions":[{"id":"authorize/3","anchor":"authorize/3"},{"id":"capture/2","anchor":"capture/2"},{"id":"purchase/3","anchor":"purchase/3"},{"id":"refund/3","anchor":"refund/3"},{"id":"store/2","anchor":"store/2"},{"id":"unstore/3","anchor":"unstore/3"},{"id":"void/2","anchor":"void/2"}]},{"id":"Kuber.Hex.Gateways.Cams","title":"Kuber.Hex.Gateways.Cams","group":"","functions":[{"id":"authorize/3","anchor":"authorize/3"},{"id":"capture/2","anchor":"capture/2"},{"id":"capture/3","anchor":"capture/3"},{"id":"purchase/3","anchor":"purchase/3"},{"id":"refund/3","anchor":"refund/3"},{"id":"store/2","anchor":"store/2"},{"id":"unstore/3","anchor":"unstore/3"},{"id":"validate_config/1","anchor":"validate_config/1"},{"id":"verify/2","anchor":"verify/2"},{"id":"void/2","anchor":"void/2"}]},{"id":"Kuber.Hex.Gateways.Monei","title":"Kuber.Hex.Gateways.Monei","group":"","functions":[{"id":"authorize/3","anchor":"authorize/3"},{"id":"capture/3","anchor":"capture/3"},{"id":"commit/4","anchor":"commit/4"},{"id":"purchase/3","anchor":"purchase/3"},{"id":"refund/3","anchor":"refund/3"},{"id":"respond/1","anchor":"respond/1"},{"id":"store/2","anchor":"store/2"},{"id":"unstore/2","anchor":"unstore/2"},{"id":"validate_config/1","anchor":"validate_config/1"},{"id":"void/2","anchor":"void/2"}]},{"id":"Kuber.Hex.Gateways.Paymill","title":"Kuber.Hex.Gateways.Paymill","group":"","functions":[{"id":"authorize/3","anchor":"authorize/3"},{"id":"authorize_with_token/3","anchor":"authorize_with_token/3"},{"id":"capture/2","anchor":"capture/2"},{"id":"capture/3","anchor":"capture/3"},{"id":"get_save_card_params/2","anchor":"get_save_card_params/2"},{"id":"purchase/3","anchor":"purchase/3"},{"id":"purchase_with_token/3","anchor":"purchase_with_token/3"},{"id":"refund/3","anchor":"refund/3"},{"id":"save/2","anchor":"save/2"},{"id":"save_card/2","anchor":"save_card/2"},{"id":"store/2","anchor":"store/2"},{"id":"unstore/3","anchor":"unstore/3"},{"id":"validate_config/1","anchor":"validate_config/1"},{"id":"void/2","anchor":"void/2"}]},{"id":"Kuber.Hex.Gateways.Stripe","title":"Kuber.Hex.Gateways.Stripe","group":"","functions":[{"id":"authorize/3","anchor":"authorize/3"},{"id":"capture/2","anchor":"capture/2"},{"id":"capture/3","anchor":"capture/3"},{"id":"purchase/3","anchor":"purchase/3"},{"id":"refund/3","anchor":"refund/3"},{"id":"store/2","anchor":"store/2"},{"id":"unstore/2","anchor":"unstore/2"},{"id":"unstore/3","anchor":"unstore/3"},{"id":"validate_config/1","anchor":"validate_config/1"},{"id":"void/2","anchor":"void/2"}]},{"id":"Kuber.Hex.Gateways.WireCard","title":"Kuber.Hex.Gateways.WireCard","group":"","functions":[{"id":"add_action_data/3","anchor":"add_action_data/3"},{"id":"add_invoice/2","anchor":"add_invoice/2"},{"id":"authorize/3","anchor":"authorize/3"},{"id":"capture/2","anchor":"capture/2"},{"id":"capture/3","anchor":"capture/3"},{"id":"purchase/3","anchor":"purchase/3"},{"id":"refund/3","anchor":"refund/3"},{"id":"store/2","anchor":"store/2"},{"id":"unstore/3","anchor":"unstore/3"},{"id":"validate_config/1","anchor":"validate_config/1"},{"id":"void/2","anchor":"void/2"}]},{"id":"Kuber.Hex.Response","title":"Kuber.Hex.Response","group":"","functions":[{"id":"error/1","anchor":"error/1"},{"id":"success/1","anchor":"success/1"}]},{"id":"Kuber.Hex.Worker","title":"Kuber.Hex.Worker","group":"","functions":[{"id":"handle_call/3","anchor":"handle_call/3"},{"id":"start_link/3","anchor":"start_link/3"}]}],"tasks":[]} \ No newline at end of file diff --git a/doc/fonts/icomoon.eot b/doc/fonts/icomoon.eot deleted file mode 100644 index 05e6530f464fb1f74663ea098134b32daf8dc11d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2472 zcma)8OKclO82)Exz3a8t-nG4c#@J5m#uZVMG)`;~MYT8-wM|7;)QSTVbyL?ZN$fO9 zrCPL74%7uCpqC=Jao_+!LZ}>&pojFx0U;q(0>mK!B#?SQIrPG#=9}Gh>$Day_U!+D z%>U2s%!eA0jLAr%orBReCOET4ck+d@=N4;AH@^N% zhf*5!rABRK3D5-nE}*xu&^|M}Qu!YA`$Qf(Td$q=yps14DWIu*77YG}1byW@(1o*$ zs}}=5(wCtB0=;{oHCOZeAYUU=3!r0*wTnww&}*RgfzCB+i}m*oX@7!#5ivSTt(8^e ziQ)Z4$ceKX>>2_Sn`LLfdDew@DM_yiy}rSa#?DbC+8$<`-A&3dObA6SdLw5eBAS?K z$Q;ORtu)DW5_}8Q;J_K>Ha(l=t@u`M+p|5~{kz+Rlm>8F_vdUk`%UKe%&!Iy{s!y* zsJ4;)V8r0V=#yd-Ri3n!A6Wc5Poik|4!grP=oz|#hZlads*>Mm9a00mQM`xy8$CYx4%_rlD za76R@eBr9Z!?9TWv6N++S|FsT{!lbwnxiRDw4e( z&`dKDkit+>k)E3v2vyPdC`?9jK27t5dqEM-^y1}z(1XY6Fj1th2ddMG{K$l8Mt`j; z=s_up;)`E@afRT1b8Z(4g=ESw{Jv-#ikhahliAEjF<(d}4bwD|sY1S(Ne@|;j$v6t z=}dMg-J{Y&S+-%A$yB~j9LZ#pZ3PY#rEU5BhLIB7Vj-VOn#P#!x2$wJlSvC(zaO4@ zlwZgGJWgZmW41=SogEgn4EA7Q&bnr%_p_qC3rbU2CN{x!4Gq3}6-`FeP6x5Ef={eRD!a|*DNMWQ2~>9&>$BI52**}}s5n}Q zU=tx+Jf_C`^hLeyXJV?X32MS|zgb8bk; z5LUB>gtQ$To}An{XM69xEv!9E<}y3aZ4{2a7_>xL9Gl`>hk0vj{qjr3zPsdi&eCs( zwOC8a{mM zGqlN$vbWezQczk0R~Y%IgFcAS@6Kl65u{JtxQtZL!a``OI6WMk124O{4E%zNdvGd8 zU0ebGu#5Z9>o>%yftv+`f7Qh$;0+h&z@K(;8Tcg^_uz7XQ`5Fpz(3~VKANTv&ds$J zTdn5K8^($H^2)hZGq-nqa`3fcpw&R;v3ldeLT!2HePy8LfmU-h*Qht^%eB?|>D;My z?%-VO2yz>z1NN0>6{~3AlGC&=IyG7aJPqC{YU6p(z9JoQuSnylx6>cH^n)J%0HnA; AGynhq diff --git a/doc/fonts/icomoon.svg b/doc/fonts/icomoon.svg deleted file mode 100644 index b34e2894..00000000 --- a/doc/fonts/icomoon.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - -Generated by IcoMoon - - - - - - - - - - - - \ No newline at end of file diff --git a/doc/fonts/icomoon.ttf b/doc/fonts/icomoon.ttf deleted file mode 100644 index 6e45b239c7c997d5705813948091622482e1f9ab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2308 zcma)7OKclO82)Exz3W}Cy=!~@jIo{AjVq!y4<|N=qFNk^+NJ^(wc>z8+{8^w5<9O- zwJ1^!)CDAI?FBkko3TUca0E7Q7L0|b6bn(K{`sLsc^f~B1K_6Uf&DMS2%h!q2 zBIx*1{qiz}=rzzsKw|rZb z?ZkF|*S9;^{j1xBl=k7W?oYXH?(6Jt*Ag`v_go=Vvfl_#o|qpVV`OieoM;lhy61Sq)t zvg*3<>|8P2#BA5I>mUx`2JqYuPfdD`tCccaNF|bysHW?Bq$cr5Jf3(YZCjQW3@d6N z97|f3Wz-B+QB=bK9=6Qjp;&^eT&hKq$<#alTRWOaqRL3CNTyQBM6||a z%kMXI)3OaI9556mSTig$95yW@s9*#SDKe`e*&9L4vZ6sL0wopcd5M8g72}Y?WF)6+ znjYx|ML5f^5$*NhQ94N!?dyT+wxTdJDw@$>t15a>j-mMC=`XGjJZR3{Qn8pyn`S_d zwV|kKN;{Ry4wVYUbjq|WGnFnDO4-bSZ5tT2J&?)f1~NS=GmvAOrj<$;ilw1!F4b1x zKvCLuAYhtl!7UXF>6B%T7y;YPWU|?eunh#@sYeA2?9Vea!aiafbkN;lG23K&3v<^s zHF=bkoLx|!$T6`AZfI!mwQFcHqINonjTLk{?lJ_;HWa~hL`Vxz(160gF%>6sglg{+c#f%(L8dG0)k2O&EW3X9_;R*3Y(z)IB)KNjdQn?bU-kq zWZzBdYUn*xL5eFCbj+J)07vLkl3^Wm)OFnTS=wUHvbWfeQb^kHjCAUt4`TGYa~Sx9 z=wmM~BNeoJb4$QyJe&isc(@Gwl85{7SB`nO0{%%4*U{@Y#9u?!zzIR(;u7$A59h$2 z^l%yY6%Y4OobcClY!&cNd$>-M^ufj1)>5n0q>D65En32CQS)qLb?suSnIAtqMrWx( ztF#6M2;gU&4%67aR{JtfH|8%b)>jdToCEJ1wedafEZ~&80OaWY!FwIq2mTFl5H9Qh diff --git a/doc/fonts/icomoon.woff b/doc/fonts/icomoon.woff deleted file mode 100644 index e6a27efd10fa2da16fb5798440ff3d79d7bd7fe3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2384 zcma)7O>7%Q6n?Y2-u156-nG5{jj^5BjS*3sHco61AS@1n{;5?_D{jm4F!tN|-ZyXF zd-G;?_SGY^vm^*jKT09DS3I5Z{q4vLlT$<@2=*jPa87%3Zn?PvZUOoQmh0bsX3jU) znEMqv+p^g6OWl{j{XrCf8lXdK^&b{m&C^6GII6J(UMmF`KoV(X=&s0rN%q3>`gw5A zgL{-E{1bh-)R|*D#Gxch;78@ka`QZN?K1SDD-pWfZZ5aLeTdjSmiG_nf3I}b*0J8b zckN^#SzH%aI5}}hAX9qI?{8Cv-he*bggvY=ZV+vcimm<@6$J#0fDBsE1#T3e9L5;u z@MNnTDQ-O-vcYimi(7%M+RfC>;&xzrwEs`P@6Laa75!fd{la(oKl8s?a^!d4pKE;I zLy&+EYbYm)sQ!eT;=Mc{&PkN$-x9aPCOu0RvAn5Nl79(DQ!Sxt_?5;gb03^mmV*Tu_d~a$5%Dag+I?5hMR=rdG;J6(Rl%U_v16uzTax9rlJ(6{7TMtK7Efh_pZQC{*rlzWzX#z)WE4(|Ak~LXs#M0@^d;i-yo=Rm0 zvGlkfOKci?JeEplGU-&jArw0pG!4skOeq>NRW;l&Z7UkJY%{E)g?FopXdv0EVcoXl zVJQY94e9xbLD5umw<;7QXXv^S8w5o-JE#-g+k?mGAW?j14>WHpN@J6}8N;=zV-Knc z6rX>?#pQv!n{%U5E@!fq6*3ZC80xy(%@p!ul~OsIv25GQWXq*WJ~!exCYs}nSIiIkEV~KkU^VT&p{fwx%r=U7j5PS%(>e%2*m$1o*+Up@UR?zEt%V1q> zs7$&;NDDpd=y`%W74JVyP($1hixi_>^f;L!4oqd3@n>Z;KPshJ0(j8dF|6=QEpS6TN!P@Sl*K!Y`e3ss1@iN%f>(~ql1yBaFUpE6M`U?r z#qAUj-zZW~k}Me`U=@XjVa9%C3R6Hzi?`u-k`BN(m)rO3`yA{>T*gttP-VOx$00(v zR8mU~*>k<_X5wg{MmUv=?%$2cDSh;cggl~(B#A|V@t7hc@fEUBIKi`LW!aLDA!Z%2 zB&6+Oc=B?WWwGzhyF5D}6j>2xWf#KH7dtIc!R_YWf4J|yzIpBSm#n95Q;12T??<=! zTj2NoTd2Y&)F9qBuVIdRx0AGs2`N2vlX@1$z?4+kO4&`Y} z92M_~pQVVj;ZHKChkf8S?9L_dh|ni~TtOOi@8*_(Px@E}uK8F2KIh{AzU&DftKbj% z*uY-D#a|6Y2NS`Fhb7>7AIrc``&a?K;Nt+kyG0+X;E(y(plSNx%v@)=(`nNgnxhUa zLpszx(OO+Q(`gs??b%Bws70%^1_KPh&pz5idv~0*BYCVfe{QL{il8kddXAQ;Nvk_r z&UV`C#ramdwc1>7oi3j07WdC}4kNccH0#D*NA!8PX}cLUX&wD(aHpt?=YDqqhrI@k7> diff --git a/doc/index.html b/doc/index.html deleted file mode 100644 index f417a2e8..00000000 --- a/doc/index.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - kuber_hex v0.0.2 – Documentation - - - - - - diff --git a/doc/search.html b/doc/search.html deleted file mode 100644 index 4d27d6f8..00000000 --- a/doc/search.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - Search – kuber_hex v0.0.2 - - - - - - - - - - - -
    - - - -
    -
    -
    - - - -
    -
    -
    -
    - - - - - - - - From 7a91a2e6bf1a53b5dea833128c560eb78983f48c Mon Sep 17 00:00:00 2001 From: Gopal Shimpi Date: Wed, 20 Dec 2017 13:03:42 +0530 Subject: [PATCH 05/17] Reorganised docs --- lib/kuber_hex/gateways/cams.ex | 89 +++++++++++++++++----------------- 1 file changed, 45 insertions(+), 44 deletions(-) diff --git a/lib/kuber_hex/gateways/cams.ex b/lib/kuber_hex/gateways/cams.ex index c1c309c7..5fcc69ab 100644 --- a/lib/kuber_hex/gateways/cams.ex +++ b/lib/kuber_hex/gateways/cams.ex @@ -1,6 +1,6 @@ defmodule Gringotts.Gateways.Cams do - @moduledoc ~S""" - Test it using test crediantials username:***testintegrationc***, password:***password9*** + @moduledoc ~S""" + Test it using test crediantials username:***testintegrationc***, password:***password9*** The following features of CAMS are implemented: @@ -14,8 +14,49 @@ defmodule Gringotts.Gateways.Cams do * **Void** In `void/2` - * **Verify** In `verify/2` + * **Verify** In `verify/2` + + payment = %CreditCard{ + number: "4111111111111111", + month: 11, + year: 2018, + first_name: "Longbob", + last_name: "Longsen", + verification_code: "123", + brand: "visa" + } + credit_card = %CreditCard{ + number: "4242424242424242", + month: 11, + year: 2018, + first_name: "Longbob", + last_name: "Longsen", + verification_code: "123", + brand: "visa" + } + address = %{ + name: "Jim Smith", + address1: "456 My Street", + address2: "Apt 1", + company: "Widgets Inc", + city: "Ottawa", + state: "ON", + zip: "K1C2N6", + country: "CA", + phone: "(555)555-5555", + fax: "(555)555-6666" + } + options = [ + config: %{ + username: "testintegrationc", + password: "password9" + }, + order_id: 1, + billing_address: address, + description: "Store Purchase", + ] """ + @live_url "https://secure.centralams.com/gw/api/transact.php" @supported_countries ["US"] @default_currency "USD" @@ -32,47 +73,7 @@ defmodule Gringotts.Gateways.Cams do Address, Response } - @doc """ - payment = %CreditCard{ - number: "4111111111111111", - month: 11, - year: 2018, - first_name: "Longbob", - last_name: "Longsen", - verification_code: "123", - brand: "visa" - } - credit_card = %CreditCard{ - number: "4242424242424242", - month: 11, - year: 2018, - first_name: "Longbob", - last_name: "Longsen", - verification_code: "123", - brand: "visa" - } - address = %{ - name: "Jim Smith", - address1: "456 My Street", - address2: "Apt 1", - company: "Widgets Inc", - city: "Ottawa", - state: "ON", - zip: "K1C2N6", - country: "CA", - phone: "(555)555-5555", - fax: "(555)555-6666" - } - options = [ - config: %{ - username: "testintegrationc", - password: "password9" - }, - order_id: 1, - billing_address: address, - description: "Store Purchase", - ] - """ + import Poison, only: [decode!: 1] @doc """ From 1bfa8fd72554123a6df6c893193659212fe03f63 Mon Sep 17 00:00:00 2001 From: Gopal Shimpi Date: Wed, 20 Dec 2017 13:40:46 +0530 Subject: [PATCH 06/17] Void method docs is completed --- lib/gringotts/gateways/cams.ex | 138 +++++++++++++++++---------------- 1 file changed, 71 insertions(+), 67 deletions(-) diff --git a/lib/gringotts/gateways/cams.ex b/lib/gringotts/gateways/cams.ex index 5fcc69ab..1bd21be3 100644 --- a/lib/gringotts/gateways/cams.ex +++ b/lib/gringotts/gateways/cams.ex @@ -1,78 +1,39 @@ defmodule Gringotts.Gateways.Cams do @moduledoc ~S""" - Test it using test crediantials username:***testintegrationc***, password:***password9*** + An API client for the [CAMS](https://www.centralams.com/) gateway. + For referance you can test gateway operations [CAMS API SANDBOX] (https://secure.centralams.com). - The following features of CAMS are implemented: + Test it using test crediantials username:***testintegrationc***, password:***password9*** - * **Purchase** In `purchase/3` + The following features of CAMS are implemented: - * **Authorize** In `authorize/3` + * **Purchase** In `purchase/3` - * **Capture** In `capture/3` + * **Authorize** In `authorize/3` - * **Refund** In `refund/3` + * **Capture** In `capture/3` - * **Void** In `void/2` + * **Refund** In `refund/3` + + * **Void** In `void/2` - * **Verify** In `verify/2` + * **Verify** In `verify/2` + """ + @live_url "https://secure.centralams.com/gw/api/transact.php" + @supported_countries ["US"] + @default_currency "USD" + @supported_cardtypes [:visa, :master, :american_express, :discover] + @homepage_url "https://www.centralams.com/" + @display_name "CAMS: Central Account Management System" + @headers [{"Content-Type", "application/x-www-form-urlencoded"}] - payment = %CreditCard{ - number: "4111111111111111", - month: 11, - year: 2018, - first_name: "Longbob", - last_name: "Longsen", - verification_code: "123", - brand: "visa" - } - credit_card = %CreditCard{ - number: "4242424242424242", - month: 11, - year: 2018, - first_name: "Longbob", - last_name: "Longsen", - verification_code: "123", - brand: "visa" - } - address = %{ - name: "Jim Smith", - address1: "456 My Street", - address2: "Apt 1", - company: "Widgets Inc", - city: "Ottawa", - state: "ON", - zip: "K1C2N6", - country: "CA", - phone: "(555)555-5555", - fax: "(555)555-6666" + use Gringotts.Gateways.Base + use Gringotts.Adapter, required_config: [:username, :password, :default_currency] + alias Gringotts.{ + CreditCard, + Address, + Response } - options = [ - config: %{ - username: "testintegrationc", - password: "password9" - }, - order_id: 1, - billing_address: address, - description: "Store Purchase", - ] -""" - - @live_url "https://secure.centralams.com/gw/api/transact.php" - @supported_countries ["US"] - @default_currency "USD" - @supported_cardtypes [:visa, :master, :american_express, :discover] - @homepage_url "https://www.centralams.com/" - @display_name "CAMS: Central Account Management System" - @headers [{"Content-Type", "application/x-www-form-urlencoded"}] - - - use Gringotts.Gateways.Base - use Gringotts.Adapter, required_config: [:username, :password, :default_currency] - alias Gringotts.{ - CreditCard, - Address, - Response - } import Poison, only: [decode!: 1] @@ -139,7 +100,7 @@ defmodule Gringotts.Gateways.Cams do Successful transaction can be refunded after settlement or any time. - It requires *transactionid* for refund the specified amount back to credit card holder. + It requires *transactionid* for refund the specified amount back to authorized payment source. Only purchased(sale) transactions can be refund based on thier `transactionid`. It take `money`, `authorization` and `options` as parameters. Where `money` is a amount to be refund and `authorization` is a response returned by `purchase/3` method. @@ -155,8 +116,12 @@ defmodule Gringotts.Gateways.Cams do end @doc """ - Transaction can be cancled only before settlement. - It require *transactionid* for cancel the transaction. + Use this method for cancel the transaction. + + + It is use to cancel the purchase(sale) transaction before settlement. + Authorised transaction can be canceled, but once it captured, it can not be canceled. + It requires *transactionid* to cancle transaction.Amount returned to the authorized payment source. """ @spec void(String.t, Keyword) :: Response def void(authorization , options) do @@ -246,3 +211,42 @@ defmodule Gringotts.Gateways.Cams do |> Keyword.put(:authcode, String.to_integer(response_body["authcode"])) end end +# payment = %CreditCard{ +# number: "4111111111111111", +# month: 11, +# year: 2018, +# first_name: "Longbob", +# last_name: "Longsen", +# verification_code: "123", +# brand: "visa" +# } +# credit_card = %CreditCard{ +# number: "4242424242424242", +# month: 11, +# year: 2018, +# first_name: "Longbob", +# last_name: "Longsen", +# verification_code: "123", +# brand: "visa" +# } +# address = %{ +# name: "Jim Smith", +# address1: "456 My Street", +# address2: "Apt 1", +# company: "Widgets Inc", +# city: "Ottawa", +# state: "ON", +# zip: "K1C2N6", +# country: "CA", +# phone: "(555)555-5555", +# fax: "(555)555-6666" +# } +# options = [ +# config: %{ +# username: "testintegrationc", +# password: "password9" +# }, +# order_id: 1, +# billing_address: address, +# description: "Store Purchase", +# ] \ No newline at end of file From 1a1fba9900a0928a212e13ff91f5b7885c700bf3 Mon Sep 17 00:00:00 2001 From: Gopal Shimpi Date: Wed, 20 Dec 2017 14:58:16 +0530 Subject: [PATCH 07/17] Final commit before PR, Removed verify method. --- lib/gringotts/gateways/cams.ex | 115 ++++++++++++++++----------------- 1 file changed, 54 insertions(+), 61 deletions(-) diff --git a/lib/gringotts/gateways/cams.ex b/lib/gringotts/gateways/cams.ex index 1bd21be3..cba87740 100644 --- a/lib/gringotts/gateways/cams.ex +++ b/lib/gringotts/gateways/cams.ex @@ -16,8 +16,6 @@ defmodule Gringotts.Gateways.Cams do * **Refund** In `refund/3` * **Void** In `void/2` - - * **Verify** In `verify/2` """ @live_url "https://secure.centralams.com/gw/api/transact.php" @supported_countries ["US"] @@ -46,6 +44,18 @@ defmodule Gringotts.Gateways.Cams do Required fields in credit card are `Credit Card Number` & `Expiration Date`. Whereas `options` contains other information like billing address,order information etc. After successful transaction it returns response containing **authcode** & **transactionid**. + + ## Examples + payment = %{ + number: "4111111111111111", month: 11, year: 2018, + first_name: "Longbob", last_name: "Longsen", + verification_code: "123", brand: "visa" + } + + options = [currancy: "USD"] + money = 100 + + iex> Gringotts.purchase(:payment_worker, Gringotts.Gateways.Cams, money, payment, options) """ @spec purchase(number, CreditCard, Keyword) :: Response def purchase(money, payment, options) do @@ -57,17 +67,29 @@ defmodule Gringotts.Gateways.Cams do end @doc """ - Use this method for authorising the credit card for particular transaction. + Use this method for authorizing the credit card for particular transaction. - `authorize/3` method only authorise the transaction,it does not transfer the funds. - After authorised a transaction, we need to call `capture/3` method to complete the transaction. - After successful authorisation it returns response containing **authcode** and **transactionid**. + `authorize/3` method only authorize the transaction,it does not transfer the funds. + After authorized a transaction, we need to call `capture/3` method to complete the transaction. + After successful authorization it returns response containing **authcode** and **transactionid**. We required **authcode**,**transactionid** and **money** for capturing transaction later on. It perform operation by taking `money`, `payment` (credit card details) & `options` as parameters. Here `money` is required field which contains amount to be deducted. Required fields in credit card are `Credit Card Number` & `Expiration Date`. Whereas `options` contains other information like billing address,order information etc. + + ## Examples + payment = %{ + number: "4111111111111111", month: 11, year: 2018, + first_name: "Longbob", last_name: "Longsen", + verification_code: "123", brand: "visa" + } + + options = [currancy: "USD"] + money = 100 + + iex> Gringotts.authorize(:payment_worker, Gringotts.Gateways.Cams, money, payment, options) """ @spec authorize(number, CreditCard, Keyword) :: Response def authorize(money, payment, options) do @@ -79,13 +101,22 @@ defmodule Gringotts.Gateways.Cams do end @doc """ - Use this method for capture the amount of the authorised transaction which is previously authorised by `authorize/3` method. + Use this method for capture the amount of the authorized transaction which is previously authorized by `authorize/3` method. - It take `money`, `authorization` and `options` as parameters. + It takes `money`, `authorization` and `options` as parameters. Where `money` is a amount to be captured and `authorization` is a response returned by `authorize/3` method. From response it takes `authcode` and `transactionid` for further processing. Both *money* and *authorization* are required fields, whereas `options` are as same as `authorize/3` and `purchase/3` methods. + + + ## Examples + + authorization = "response=1&responsetext=SUCCESS&authcode=123456&transactionid=3904093075&avsresponse=N&cvvresponse=N&orderid=&type=sale&response_code=100" + options = [currancy: "USD"] + money = 100 + + iex> Gringotts.capture(:payment_worker, Gringotts.Gateways.Cams, money, authorization, options) """ @spec capture(number, String.t, Keyword) :: Response def capture(money, authorization, options) do @@ -102,10 +133,18 @@ defmodule Gringotts.Gateways.Cams do Successful transaction can be refunded after settlement or any time. It requires *transactionid* for refund the specified amount back to authorized payment source. Only purchased(sale) transactions can be refund based on thier `transactionid`. - It take `money`, `authorization` and `options` as parameters. + It takes `money`, `authorization` and `options` as parameters. Where `money` is a amount to be refund and `authorization` is a response returned by `purchase/3` method. From response it takes `authcode` and `transactionid` for further processing. Both *money* and *authorization* are required fields, whereas `options` are as same as `authorize/3`, `purchase/3` and `capture/3` methods. + + ## Examples + + authorization = "response=1&responsetext=SUCCESS&authcode=123456&transactionid=3904093075&avsresponse=N&cvvresponse=N&orderid=&type=sale&response_code=100" + options = [currancy: "USD"] + money = 100 + + iex> Gringotts.refund(:payment_worker, Gringotts.Gateways.Cams, money, authorization, options) """ @spec refund(number, String.t, Keyword) :: Response def refund(money, authorization, options) do @@ -122,6 +161,12 @@ defmodule Gringotts.Gateways.Cams do It is use to cancel the purchase(sale) transaction before settlement. Authorised transaction can be canceled, but once it captured, it can not be canceled. It requires *transactionid* to cancle transaction.Amount returned to the authorized payment source. + ## Examples + + authorization = "response=1&responsetext=SUCCESS&authcode=123456&transactionid=3904093075&avsresponse=N&cvvresponse=N&orderid=&type=sale&response_code=100" + options = [] + + iex> Gringotts.void(:payment_worker, Gringotts.Gateways.Cams, authorization, options) """ @spec void(String.t, Keyword) :: Response def void(authorization , options) do @@ -129,19 +174,6 @@ defmodule Gringotts.Gateways.Cams do commit("void", post, options) end - @doc """ - This mehthod is for only verification purpose for credit card. - Here we need to provide CreditCard info. - """ - @spec verify(CreditCard, Keyword) :: Response - def verify(credit_card, options) do - post = [] - |> add_invoice( 0, options) - |> add_payment(credit_card) - |> add_address(credit_card, options) - commit("verify", post, options) - end - # private methods defp add_invoice(post, money, options) do @@ -211,42 +243,3 @@ defmodule Gringotts.Gateways.Cams do |> Keyword.put(:authcode, String.to_integer(response_body["authcode"])) end end -# payment = %CreditCard{ -# number: "4111111111111111", -# month: 11, -# year: 2018, -# first_name: "Longbob", -# last_name: "Longsen", -# verification_code: "123", -# brand: "visa" -# } -# credit_card = %CreditCard{ -# number: "4242424242424242", -# month: 11, -# year: 2018, -# first_name: "Longbob", -# last_name: "Longsen", -# verification_code: "123", -# brand: "visa" -# } -# address = %{ -# name: "Jim Smith", -# address1: "456 My Street", -# address2: "Apt 1", -# company: "Widgets Inc", -# city: "Ottawa", -# state: "ON", -# zip: "K1C2N6", -# country: "CA", -# phone: "(555)555-5555", -# fax: "(555)555-6666" -# } -# options = [ -# config: %{ -# username: "testintegrationc", -# password: "password9" -# }, -# order_id: 1, -# billing_address: address, -# description: "Store Purchase", -# ] \ No newline at end of file From 6640077b6766c49871c5fd28102c1741dd7442cb Mon Sep 17 00:00:00 2001 From: Gopal Shimpi Date: Wed, 20 Dec 2017 15:14:50 +0530 Subject: [PATCH 08/17] Removed unused module variables --- lib/gringotts/gateways/cams.ex | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/gringotts/gateways/cams.ex b/lib/gringotts/gateways/cams.ex index cba87740..1ff87886 100644 --- a/lib/gringotts/gateways/cams.ex +++ b/lib/gringotts/gateways/cams.ex @@ -18,11 +18,7 @@ defmodule Gringotts.Gateways.Cams do * **Void** In `void/2` """ @live_url "https://secure.centralams.com/gw/api/transact.php" - @supported_countries ["US"] @default_currency "USD" - @supported_cardtypes [:visa, :master, :american_express, :discover] - @homepage_url "https://www.centralams.com/" - @display_name "CAMS: Central Account Management System" @headers [{"Content-Type", "application/x-www-form-urlencoded"}] use Gringotts.Gateways.Base From 3b9da10690c4cbedf645349923aba7b9792357ae Mon Sep 17 00:00:00 2001 From: Gopal Shimpi Date: Wed, 20 Dec 2017 16:22:20 +0530 Subject: [PATCH 09/17] Modification as suggested by Sagar --- lib/gringotts/gateways/cams.ex | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/lib/gringotts/gateways/cams.ex b/lib/gringotts/gateways/cams.ex index 1ff87886..09dafbb6 100644 --- a/lib/gringotts/gateways/cams.ex +++ b/lib/gringotts/gateways/cams.ex @@ -34,7 +34,6 @@ defmodule Gringotts.Gateways.Cams do @doc """ Use this method for performing purchase(sale) operation. - It perform operation by taking `money`, `payment`(credit card details) & `options` as parameters. Here `money` is required field which contains amount to be deducted. Required fields in credit card are `Credit Card Number` & `Expiration Date`. @@ -48,7 +47,7 @@ defmodule Gringotts.Gateways.Cams do verification_code: "123", brand: "visa" } - options = [currancy: "USD"] + options = [currency: "USD"] money = 100 iex> Gringotts.purchase(:payment_worker, Gringotts.Gateways.Cams, money, payment, options) @@ -65,7 +64,6 @@ defmodule Gringotts.Gateways.Cams do @doc """ Use this method for authorizing the credit card for particular transaction. - `authorize/3` method only authorize the transaction,it does not transfer the funds. After authorized a transaction, we need to call `capture/3` method to complete the transaction. After successful authorization it returns response containing **authcode** and **transactionid**. @@ -82,7 +80,7 @@ defmodule Gringotts.Gateways.Cams do verification_code: "123", brand: "visa" } - options = [currancy: "USD"] + options = [currency: "USD"] money = 100 iex> Gringotts.authorize(:payment_worker, Gringotts.Gateways.Cams, money, payment, options) @@ -99,7 +97,6 @@ defmodule Gringotts.Gateways.Cams do @doc """ Use this method for capture the amount of the authorized transaction which is previously authorized by `authorize/3` method. - It takes `money`, `authorization` and `options` as parameters. Where `money` is a amount to be captured and `authorization` is a response returned by `authorize/3` method. From response it takes `authcode` and `transactionid` for further processing. @@ -109,7 +106,7 @@ defmodule Gringotts.Gateways.Cams do ## Examples authorization = "response=1&responsetext=SUCCESS&authcode=123456&transactionid=3904093075&avsresponse=N&cvvresponse=N&orderid=&type=sale&response_code=100" - options = [currancy: "USD"] + options = [currency: "USD"] money = 100 iex> Gringotts.capture(:payment_worker, Gringotts.Gateways.Cams, money, authorization, options) @@ -125,7 +122,6 @@ defmodule Gringotts.Gateways.Cams do @doc """ Use this method for refund the amount for particular transaction. - Successful transaction can be refunded after settlement or any time. It requires *transactionid* for refund the specified amount back to authorized payment source. Only purchased(sale) transactions can be refund based on thier `transactionid`. @@ -137,7 +133,7 @@ defmodule Gringotts.Gateways.Cams do ## Examples authorization = "response=1&responsetext=SUCCESS&authcode=123456&transactionid=3904093075&avsresponse=N&cvvresponse=N&orderid=&type=sale&response_code=100" - options = [currancy: "USD"] + options = [currency: "USD"] money = 100 iex> Gringotts.refund(:payment_worker, Gringotts.Gateways.Cams, money, authorization, options) @@ -153,10 +149,9 @@ defmodule Gringotts.Gateways.Cams do @doc """ Use this method for cancel the transaction. - It is use to cancel the purchase(sale) transaction before settlement. Authorised transaction can be canceled, but once it captured, it can not be canceled. - It requires *transactionid* to cancle transaction.Amount returned to the authorized payment source. + It requires *transactionid* to cancle transaction.Amount is returned to the authorized payment source. ## Examples authorization = "response=1&responsetext=SUCCESS&authcode=123456&transactionid=3904093075&avsresponse=N&cvvresponse=N&orderid=&type=sale&response_code=100" From 2447223a4c944fe5800dc6b796fe303d9b84716e Mon Sep 17 00:00:00 2001 From: Gopal Shimpi Date: Wed, 20 Dec 2017 18:02:42 +0530 Subject: [PATCH 10/17] Refactored the authorised purchase method for transaction id --- lib/gringotts/gateways/cams.ex | 51 ++++++++++++++++++---------------- mix.lock | 1 + 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/lib/gringotts/gateways/cams.ex b/lib/gringotts/gateways/cams.ex index 09dafbb6..953f2ab5 100644 --- a/lib/gringotts/gateways/cams.ex +++ b/lib/gringotts/gateways/cams.ex @@ -38,7 +38,7 @@ defmodule Gringotts.Gateways.Cams do Here `money` is required field which contains amount to be deducted. Required fields in credit card are `Credit Card Number` & `Expiration Date`. Whereas `options` contains other information like billing address,order information etc. - After successful transaction it returns response containing **authcode** & **transactionid**. + After successful transaction it returns response containing **transactionid**. ## Examples payment = %{ @@ -58,7 +58,10 @@ defmodule Gringotts.Gateways.Cams do |> add_invoice(money, options) |> add_payment(payment) |> add_address(payment, options) - commit("sale", post, options) + + response = commit("sale", post, options) + {:ok, response} = response + extract_auth([], response) end @doc """ @@ -66,8 +69,8 @@ defmodule Gringotts.Gateways.Cams do `authorize/3` method only authorize the transaction,it does not transfer the funds. After authorized a transaction, we need to call `capture/3` method to complete the transaction. - After successful authorization it returns response containing **authcode** and **transactionid**. - We required **authcode**,**transactionid** and **money** for capturing transaction later on. + After successful authorization it returns response containing **transactionid**. + We required **transactionid** and **money** for capturing transaction later on. It perform operation by taking `money`, `payment` (credit card details) & `options` as parameters. Here `money` is required field which contains amount to be deducted. Required fields in credit card are `Credit Card Number` & `Expiration Date`. @@ -91,7 +94,10 @@ defmodule Gringotts.Gateways.Cams do |> add_invoice(money, options) |> add_payment(payment) |> add_address(payment, options) - commit("auth", post, options) + + response = commit("auth", post, options) + {:ok, response} = response + extract_auth([], response) end @doc """ @@ -99,13 +105,13 @@ defmodule Gringotts.Gateways.Cams do It takes `money`, `authorization` and `options` as parameters. Where `money` is a amount to be captured and `authorization` is a response returned by `authorize/3` method. - From response it takes `authcode` and `transactionid` for further processing. - Both *money* and *authorization* are required fields, whereas `options` are as same as `authorize/3` and `purchase/3` methods. + From response it takes `transactionid` for further processing. + Both `money` and `authorization` are required fields, whereas `options` are as same as `authorize/3` and `purchase/3` methods. ## Examples - authorization = "response=1&responsetext=SUCCESS&authcode=123456&transactionid=3904093075&avsresponse=N&cvvresponse=N&orderid=&type=sale&response_code=100" + authorization = "3904093075" options = [currency: "USD"] money = 100 @@ -113,9 +119,8 @@ defmodule Gringotts.Gateways.Cams do """ @spec capture(number, String.t, Keyword) :: Response def capture(money, authorization, options) do - post = [] - |> extract_auth(authorization) - |> add_invoice(money,options) + post = [transactionid: authorization] + add_invoice(post, money,options) commit("capture", post, options) end @@ -127,12 +132,12 @@ defmodule Gringotts.Gateways.Cams do Only purchased(sale) transactions can be refund based on thier `transactionid`. It takes `money`, `authorization` and `options` as parameters. Where `money` is a amount to be refund and `authorization` is a response returned by `purchase/3` method. - From response it takes `authcode` and `transactionid` for further processing. - Both *money* and *authorization* are required fields, whereas `options` are as same as `authorize/3`, `purchase/3` and `capture/3` methods. + From response it takes `transactionid` for further processing. + Both `money` and `authorization` are required fields, whereas `options` are as same as `authorize/3`, `purchase/3` and `capture/3` methods. ## Examples - authorization = "response=1&responsetext=SUCCESS&authcode=123456&transactionid=3904093075&avsresponse=N&cvvresponse=N&orderid=&type=sale&response_code=100" + authorization = "3904093078" options = [currency: "USD"] money = 100 @@ -140,9 +145,8 @@ defmodule Gringotts.Gateways.Cams do """ @spec refund(number, String.t, Keyword) :: Response def refund(money, authorization, options) do - post = [] - |> extract_auth(authorization) - |> add_invoice(money, options) + post = [transactionid: authorization] + add_invoice(post, money,options) commit("refund", post, options) end @@ -151,17 +155,17 @@ defmodule Gringotts.Gateways.Cams do It is use to cancel the purchase(sale) transaction before settlement. Authorised transaction can be canceled, but once it captured, it can not be canceled. - It requires *transactionid* to cancle transaction.Amount is returned to the authorized payment source. + It requires `transactionid` to cancle transaction.Amount is returned to the authorized payment source. ## Examples - authorization = "response=1&responsetext=SUCCESS&authcode=123456&transactionid=3904093075&avsresponse=N&cvvresponse=N&orderid=&type=sale&response_code=100" + authorization = "3904093075" options = [] iex> Gringotts.void(:payment_worker, Gringotts.Gateways.Cams, authorization, options) """ @spec void(String.t, Keyword) :: Response def void(authorization , options) do - post = extract_auth([], authorization) + post = [transactionid: authorization] commit("void", post, options) end @@ -228,9 +232,8 @@ defmodule Gringotts.Gateways.Cams do { :error, "Some error has been occurred" } end - defp extract_auth(post,authorization) do - response_body = URI.decode_query(authorization) - Keyword.put([],:transactionid,String.to_integer(response_body["transactionid"])) - |> Keyword.put(:authcode, String.to_integer(response_body["authcode"])) + defp extract_auth(post, response) do + response_body = URI.decode_query(response) + response_body["transactionid"] end end diff --git a/mix.lock b/mix.lock index d352a3b4..245bd62b 100644 --- a/mix.lock +++ b/mix.lock @@ -13,6 +13,7 @@ "hackney": {:hex, :hackney, "1.10.1", "c38d0ca52ea80254936a32c45bb7eb414e7a96a521b4ce76d00a69753b157f21", [:rebar3], [{:certifi, "2.0.0", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "5.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "1.0.1", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "1.0.2", [hex: :mimerl, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "1.1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm"}, "httpoison": {:hex, :httpoison, "0.13.0", "bfaf44d9f133a6599886720f3937a7699466d23bb0cd7a88b6ba011f53c6f562", [:mix], [{:hackney, "~> 1.8", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm"}, "idna": {:hex, :idna, "5.1.0", "d72b4effeb324ad5da3cab1767cb16b17939004e789d8c0ad5b70f3cea20c89a", [:rebar3], [{:unicode_util_compat, "0.3.1", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm"}, + "inch_ex": {:hex, :inch_ex, "0.5.6", "418357418a553baa6d04eccd1b44171936817db61f4c0840112b420b8e378e67", [], [{:poison, "~> 1.5 or ~> 2.0 or ~> 3.0", [hex: :poison, repo: "hexpm", optional: false]}], "hexpm"}, "jsx": {:hex, :jsx, "2.8.3", "a05252d381885240744d955fbe3cf810504eb2567164824e19303ea59eef62cf", [], [], "hexpm"}, "meck": {:hex, :meck, "0.8.9", "64c5c0bd8bcca3a180b44196265c8ed7594e16bcc845d0698ec6b4e577f48188", [:rebar3], [], "hexpm"}, "metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], []}, From 61310573d6cc900a777fbf3c5163f1aa74227aa4 Mon Sep 17 00:00:00 2001 From: Gopal Shimpi Date: Wed, 20 Dec 2017 19:14:23 +0530 Subject: [PATCH 11/17] fix config fetch issue --- lib/gringotts.ex | 2 +- lib/gringotts/application.ex | 2 +- lib/gringotts/worker.ex | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/gringotts.ex b/lib/gringotts.ex index 8a7a480c..7a4d4fa2 100644 --- a/lib/gringotts.ex +++ b/lib/gringotts.ex @@ -268,7 +268,7 @@ defmodule Gringotts do # time error reporting. defp validate_config(gateway) do # Keep the key name and adapter the same in the config in application - config = Application.get_env(:Gringotts, gateway) + config = Application.get_env(:gringotts, gateway) gateway.validate_config(config) end end diff --git a/lib/gringotts/application.ex b/lib/gringotts/application.ex index 8ca7927e..35bf4f8e 100644 --- a/lib/gringotts/application.ex +++ b/lib/gringotts/application.ex @@ -7,7 +7,7 @@ defmodule Gringotts.Application do def start(_type, _args) do import Supervisor.Spec, warn: false - app_config = Application.get_all_env(:Gringotts) + app_config = Application.get_all_env(:gringotts) adapters = Enum.filter(app_config, fn({key, klist}) -> klist != [] end) |> Enum.map(fn({key, klist}) -> Keyword.get(klist, :adapter) end) diff --git a/lib/gringotts/worker.ex b/lib/gringotts/worker.ex index cdd356d5..07d18b3c 100644 --- a/lib/gringotts/worker.ex +++ b/lib/gringotts/worker.ex @@ -82,6 +82,6 @@ defmodule Gringotts.Worker do end defp set_gateway_and_config(request_gateway) do - { request_gateway, Application.get_env(:Gringotts, request_gateway) } + { request_gateway, Application.get_env(:gringotts, request_gateway) } end end From e9c3234144d9e05ea048652a4478f32b4a49a9bf Mon Sep 17 00:00:00 2001 From: Sagar Karwande Date: Wed, 20 Dec 2017 22:42:22 +0530 Subject: [PATCH 12/17] minor fix for config in monei test --- test/gringotts_test.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/gringotts_test.exs b/test/gringotts_test.exs index 7a79ebb7..6c5fcd87 100644 --- a/test/gringotts_test.exs +++ b/test/gringotts_test.exs @@ -6,7 +6,7 @@ defmodule GringottsTest do defmodule FakeGateway do use Gringotts.Adapter, required_config: [:some_auth_info] - + def authorize(100, :card, _) do :authorization_response end @@ -37,7 +37,7 @@ defmodule GringottsTest do end setup_all do - Application.put_env(:Gringotts, GringottsTest.FakeGateway, [ + Application.put_env(:gringotts, GringottsTest.FakeGateway, [ adapter: GringottsTest.FakeGateway, some_auth_info: :merchant_secret_key]) :ok From b2358e6952372221dea4d89baf65a500814d1b94 Mon Sep 17 00:00:00 2001 From: Arjun Singh Date: Fri, 22 Dec 2017 18:46:49 +0530 Subject: [PATCH 13/17] Authorize net test purchase (#29) * added tests for authorize net purchase * added tests for authorize net purchase * modified file for setting global config * made changes to reflect mode in config * changed mode config value to :atom from string --- lib/gringotts.ex | 23 +++++++-- lib/gringotts/gateways/authorize_net.ex | 41 +++++++++------- lib/gringotts/worker.ex | 4 +- test/gateways/authorize_net_test.exs | 38 +++++++++++---- test/gateways/monei_test.exs | 10 ++-- test/mocks/authorize_net_mock.exs | 63 +++++++++++++++++++++++-- test/test_helper.exs | 1 - 7 files changed, 141 insertions(+), 39 deletions(-) diff --git a/lib/gringotts.ex b/lib/gringotts.ex index 7a4d4fa2..b42f69fa 100644 --- a/lib/gringotts.ex +++ b/lib/gringotts.ex @@ -2,9 +2,26 @@ defmodule Gringotts do @moduledoc ~S""" Gringotts is a payment gateway integration library supporting many gateway integrations. - Where the configuration for `Gringotts` must be in your application - environment, usually defined in your `config/config.exs`: - + ## Configuration + + The configuration for `Gringotts` must be in your application environment, + usually defined in your `config/config.exs` and are **mandatory**: + + **Global Configuration** + + The global configuration sets the library level configurations to interact with the gateway. + If the mode is not set then by 'default' the sandbox account is selected. + + To integrate with the sandbox account set. + config :gringotts, :global_config, + mode: :test + To integrate with the live account set. + config :gringotts, :global_config, + mode: :prod + + **Gateway Configuration** + + The gateway level configurations are for fields related to a specific gateway. config :Gringotts, Gringotts.Gateways.Stripe, adapter: Gringotts.Gateways.Stripe, api_key: "sk_test_vIX41hC0sdfBKrPWQerLuOMld", diff --git a/lib/gringotts/gateways/authorize_net.ex b/lib/gringotts/gateways/authorize_net.ex index 9891680e..0586652e 100644 --- a/lib/gringotts/gateways/authorize_net.ex +++ b/lib/gringotts/gateways/authorize_net.ex @@ -94,7 +94,7 @@ defmodule Gringotts.Gateways.AuthorizeNet do @spec purchase(Float, CreditCard, Keyword) :: Tuple def purchase(amount, payment, opts) do request_data = add_auth_purchase(amount, payment, opts, @transaction_type[:purchase]) - response_data = commit(:post, request_data) + response_data = commit(:post, request_data, opts) respond(response_data) end @@ -131,7 +131,7 @@ defmodule Gringotts.Gateways.AuthorizeNet do @spec authorize(Float, CreditCard, Keyword) :: Tuple def authorize(amount, payment, opts) do request_data = add_auth_purchase(amount, payment, opts, @transaction_type[:authorize]) - response_data = commit(:post, request_data) + response_data = commit(:post, request_data, opts) respond(response_data) end @@ -156,7 +156,7 @@ defmodule Gringotts.Gateways.AuthorizeNet do @spec capture(String.t, Float, Keyword) :: Tuple def capture(id, amount, opts) do request_data = normal_capture(amount, id, opts, @transaction_type[:capture]) - response_data = commit(:post, request_data) + response_data = commit(:post, request_data, opts) respond(response_data) end @@ -181,7 +181,7 @@ defmodule Gringotts.Gateways.AuthorizeNet do @spec refund(Float, String.t, Keyword) :: Tuple def refund(amount, id, opts) do request_data = normal_refund(amount, id, opts, @transaction_type[:refund]) - response_data = commit(:post, request_data) + response_data = commit(:post, request_data, opts) respond(response_data) end @@ -205,7 +205,7 @@ defmodule Gringotts.Gateways.AuthorizeNet do @spec void(String.t, Keyword) :: Tuple def void(id, opts) do request_data = normal_void(id, opts, @transaction_type[:void]) - response_data = commit(:post, request_data) + response_data = commit(:post, request_data, opts) respond(response_data) end @@ -239,7 +239,7 @@ defmodule Gringotts.Gateways.AuthorizeNet do opts[:customer_profile_id] -> create_customer_payment_profile(card, opts) |> generate true -> create_customer_profile(card, opts) |> generate end - response_data = commit(:post, request_data) + response_data = commit(:post, request_data, opts) respond(response_data) end @@ -256,14 +256,14 @@ defmodule Gringotts.Gateways.AuthorizeNet do """ @spec unstore(String.t, Keyword) :: Tuple def unstore(customer_profile_id, opts) do - request_data = delete_customer_profile(customer_profile_id, opts) - response_data = commit(:post, request_data) + request_data = delete_customer_profile(customer_profile_id, opts) |> generate + response_data = commit(:post, request_data, opts) respond(response_data) end # method to make the api request with params - defp commit(method, payload) do - path = @test_url + defp commit(method, payload, opts) do + path = base_url(opts) headers = @header HTTPoison.request(method, path, payload, headers) end @@ -279,9 +279,9 @@ defmodule Gringotts.Gateways.AuthorizeNet do raw_response[@response_type[:error_response]] -> response_check(raw_response[@response_type[:error_response]], raw_response) raw_response[@response_type[:customer_profile_response]] -> - response_check(@response_type[:customer_profile_response], raw_response) + response_check(raw_response[@response_type[:customer_profile_response]], raw_response) raw_response[@response_type[:customer_payment_profile_response]] -> - response_check(@response_type[:customer_payment_profile_response], raw_response) + response_check(raw_response[@response_type[:customer_payment_profile_response]], raw_response) raw_response[@response_type[:delete_customer_profile]] -> response_check(raw_response[@response_type[:delete_customer_profile]], raw_response) end @@ -302,7 +302,7 @@ defmodule Gringotts.Gateways.AuthorizeNet do {:error, Response.error(raw: raw_response)} end - #------------------- Helper functions for the interface functions------------------- + #------------------- Helper functions for the interface functions------------------- # function for formatting the request as an xml for purchase and authorize method defp add_auth_purchase(amount, payment, opts, transaction_type) do @@ -334,7 +334,7 @@ defmodule Gringotts.Gateways.AuthorizeNet do #function to format the request for normal refund defp normal_refund(amount, id, opts, transaction_type) do - element(:authenticateTestRequest, %{xmlns: @aut_net_namespace}, [ + element(:createTransactionRequest, %{xmlns: @aut_net_namespace}, [ add_merchant_auth(opts[:config]), add_order_id(opts), add_refund_transaction_request(amount, id, opts, transaction_type), @@ -344,7 +344,7 @@ defmodule Gringotts.Gateways.AuthorizeNet do #function to format the request for normal void operation defp normal_void(id, opts, transaction_type) do - element(:authenticateTestRequest, %{xmlns: @aut_net_namespace}, [ + element(:createTransactionRequest, %{xmlns: @aut_net_namespace}, [ add_merchant_auth(opts[:config]), add_order_id(opts), element(:transactionRequest, [ @@ -375,7 +375,7 @@ defmodule Gringotts.Gateways.AuthorizeNet do element(:description, opts[:profile][:description]), element(:email, opts[:profile][:description]), element(:paymentProfiles, [ - element(:customerType, opts[:customerType]), + element(:customerType, (if opts[:customerType], do: opts[:customerType], else: "individual")), add_payment_source(card) ]) ]) @@ -565,4 +565,13 @@ defmodule Gringotts.Gateways.AuthorizeNet do defp join_string(list, symbol) do Enum.join(list, symbol) end + + defp base_url(opts) do + cond do + opts[:config][:mode] == :prod -> @production_url + opts[:config][:mode] == :test -> @test_url + true -> @test_url + end + end + end diff --git a/lib/gringotts/worker.ex b/lib/gringotts/worker.ex index 07d18b3c..786ad6ed 100644 --- a/lib/gringotts/worker.ex +++ b/lib/gringotts/worker.ex @@ -82,6 +82,8 @@ defmodule Gringotts.Worker do end defp set_gateway_and_config(request_gateway) do - { request_gateway, Application.get_env(:gringotts, request_gateway) } + global_config = Application.get_env(:gringotts, :global_config) || [mode: :test] + gateway_config = Application.get_env(:gringotts, request_gateway) + {request_gateway, Keyword.merge(global_config, gateway_config)} end end diff --git a/test/gateways/authorize_net_test.exs b/test/gateways/authorize_net_test.exs index bd73f0be..f4e717bf 100644 --- a/test/gateways/authorize_net_test.exs +++ b/test/gateways/authorize_net_test.exs @@ -1,9 +1,12 @@ defmodule Gringotts.Gateways.AuthorizeNetTest do + + Code.require_file "../mocks/authorize_net_mock.exs", __DIR__ use ExUnit.Case, async: false - alias Gringotts.Gateways.AuthorizeNet, as: Gateway - alias Gringotts.Gateways.AuthorizeNetMock, as: MockServer + alias Gringotts.Gateways.AuthorizeNetMock, as: MockResponse alias Gringotts.CreditCard alias Gringotts.Gateways.AuthorizeNet, as: ANet + + import Mock @card %CreditCard { number: "5424000000000015", @@ -23,26 +26,41 @@ defmodule Gringotts.Gateways.AuthorizeNetTest do @bad_amount "a" @opts [ - config: %{name: "64jKa6NA", transactionKey: "4vmE338dQmAN6m7B"}, - refId: "123456", + config: %{name: "64jKa6NA", transactionKey: "4vmE338dQmAN6m7B"}, + refId: "123456", order: %{invoiceNumber: "INV-12345", description: "Product Description"}, lineItem: %{itemId: "1", name: "vase", description: "Cannes logo", quantity: "18", unitPrice: "45.00" } ] describe "purchase" do test "test_successful_purchase" do - {:ok, response} = ANet.purchase(@amount, @card, @opts) - assert response.raw["createTransactionResponse"]["messages"]["resultCode"] == "Ok" + with_mock HTTPoison, + [request: fn(_method, _url, _body, _headers) -> MockResponse.successful_purchase_response end] do + {:ok, response} = ANet.purchase(@amount, @card, @opts) + assert response.raw["createTransactionResponse"]["messages"]["resultCode"] == "Ok" + end end test "test_bad_amount_purchase" do - {:error, response} = ANet.purchase(@bad_amount, @card, @opts) - assert response.raw["createTransactionResponse"]["messages"]["resultCode"] == "Error" + with_mock HTTPoison, + [request: fn(_method, _url, _body, _headers) -> MockResponse.bad_amount_purchase_response end] do + {:error, response} = ANet.purchase(@bad_amount, @card, @opts) + assert response.raw["createTransactionResponse"]["messages"]["resultCode"] == "Error" + end end test "test_bad_card_purchase" do - {:error, response} = ANet.purchase(@amount, @bad_card, @opts) - assert response.raw["ErrorResponse"]["messages"]["resultCode"] == "Error" + with_mock HTTPoison, + [request: fn(_method, _url, _body, _headers) -> MockResponse.bad_card_purchase_response end] do + {:error, response} = ANet.purchase(@amount, @bad_card, @opts) + assert response.raw["ErrorResponse"]["messages"]["resultCode"] == "Error" + end + end + + test "test network error" do + with_mock HTTPoison, [request: fn(_method, _url, _body, _headers) -> MockResponse.network_error_response end] do + assert {:error, response} = ANet.purchase(@amount, @card, @opts) + end end end diff --git a/test/gateways/monei_test.exs b/test/gateways/monei_test.exs index 72188d63..f40bd785 100644 --- a/test/gateways/monei_test.exs +++ b/test/gateways/monei_test.exs @@ -50,10 +50,12 @@ defmodule Gringotts.Gateways.MoneiTest do # A new Bypass instance is needed per test, so that we can do parallel tests setup do bypass = Bypass.open - auth = %{userId: "8a829417539edb400153c1eae83932ac", - password: "6XqRtMGS2N", - entityId: "8a829417539edb400153c1eae6de325e", - test_url: "http://localhost:#{bypass.port}"} + auth = %{ + userId: "8a829417539edb400153c1eae83932ac", + password: "6XqRtMGS2N", + entityId: "8a829417539edb400153c1eae6de325e", + test_url: "http://localhost:#{bypass.port}" + } {:ok, bypass: bypass, auth: auth} end diff --git a/test/mocks/authorize_net_mock.exs b/test/mocks/authorize_net_mock.exs index 8151ea6d..402cd31c 100644 --- a/test/mocks/authorize_net_mock.exs +++ b/test/mocks/authorize_net_mock.exs @@ -1,6 +1,61 @@ - defmodule Gringotts.Gateways.AtuhtorizeNetMock do + defmodule Gringotts.Gateways.AuthorizeNetMock do - def successful_response do - + def successful_purchase_response do + {:ok, + %HTTPoison.Response{body: "123456OkI00001Successful.1C7HPT1YP2600365530965D6782A03246EE3BAFABE8006E32DE970XXXX0015MasterCard1This transaction has been approved.", + headers: [{"Cache-Control", "private"}, + {"Content-Type", "application/xml; charset=utf-8"}, + {"X-OPNET-Transaction-Trace", + "a2_b6b84b43-d399-4dde-bc12-fb1f8ccf4b27-51156-13182173"}, + {"Access-Control-Allow-Origin", "*"}, + {"Access-Control-Allow-Methods", "PUT,OPTIONS,POST,GET"}, + {"Access-Control-Allow-Headers", + "x-requested-with,cache-control,content-type,origin,method,SOAPAction"}, + {"Access-Control-Allow-Credentials", "true"}, {"X-Cnection", "close"}, + {"Content-Length", "908"}, {"Date", "Thu, 21 Dec 2017 09:29:12 GMT"}, + {"Connection", "keep-alive"}], + request_url: "https://apitest.authorize.net/xml/v1/request.api", + status_code: 200}} end - end \ No newline at end of file + + def bad_card_purchase_response do + {:ok, + %HTTPoison.Response{body: "ErrorE00003The 'AnetApi/xml/v1/schema/AnetApiSchema.xsd:cardNumber' element is invalid - The value XXXXX is invalid according to its datatype 'String' - The actual length is less than the MinLength value.", + headers: [{"Cache-Control", "private"}, + {"Content-Type", "application/xml; charset=utf-8"}, + {"X-OPNET-Transaction-Trace", + "a2_f2f80544-1a98-4ad7-989b-8d267ebf5043-56152-10066531"}, + {"Access-Control-Allow-Origin", "*"}, + {"Access-Control-Allow-Methods", "PUT,OPTIONS,POST,GET"}, + {"Access-Control-Allow-Headers", + "x-requested-with,cache-control,content-type,origin,method,SOAPAction"}, + {"Access-Control-Allow-Credentials", "true"}, {"X-Cnection", "close"}, + {"Content-Length", "514"}, {"Date", "Thu, 21 Dec 2017 09:35:45 GMT"}, + {"Connection", "keep-alive"}], + request_url: "https://apitest.authorize.net/xml/v1/request.api", + status_code: 200}} + end + + def bad_amount_purchase_response do + {:ok, + %HTTPoison.Response{body: "123456ErrorE00027The transaction was unsuccessful.3P0C7C56F020A2AE2660A87637CD00B4D5C0XXXX0015MasterCard5A valid amount is required.", + headers: [{"Cache-Control", "private"}, + {"Content-Type", "application/xml; charset=utf-8"}, + {"X-OPNET-Transaction-Trace", + "a2_b6b84b43-d399-4dde-bc12-fb1f8ccf4b27-51156-13187900"}, + {"Access-Control-Allow-Origin", "*"}, + {"Access-Control-Allow-Methods", "PUT,OPTIONS,POST,GET"}, + {"Access-Control-Allow-Headers", + "x-requested-with,cache-control,content-type,origin,method,SOAPAction"}, + {"Access-Control-Allow-Credentials", "true"}, {"X-Cnection", "close"}, + {"Content-Length", "867"}, {"Date", "Thu, 21 Dec 2017 09:44:33 GMT"}, + {"Connection", "keep-alive"}], + request_url: "https://apitest.authorize.net/xml/v1/request.api", + status_code: 200}} + end + + def network_error_response do + body = "no response error" + {:error, %{body: body, status_code: 500}} + end + end diff --git a/test/test_helper.exs b/test/test_helper.exs index e6bdd584..579b186b 100644 --- a/test/test_helper.exs +++ b/test/test_helper.exs @@ -1,3 +1,2 @@ ExUnit.start(trace: true, exclude: [integration: true]) Application.ensure_all_started(:bypass) - From 2928cd1a5211f925f84e6dabcac46751cb4b22d9 Mon Sep 17 00:00:00 2001 From: Ananya Bahadur Date: Fri, 22 Dec 2017 18:56:37 +0530 Subject: [PATCH 14/17] Added examples and config to docs (#38) * Added examples and config to docs * Added a small configuration guide. There's also a broken link to a "Getting Started" guide. * Examples share some context, and can be followed in an iex session. * `commit` and `respond` are now private. - Marked a test on `respond` as `:skip` because `respond` is now private, and cannot be tested :( * Integration tests were failing ever since the lib rename. Fixed that. * Corrected example config Thanks @SagarKarwande * Copied variable bindings to all examples --- lib/gringotts/gateways/monei.ex | 165 +++++++++++++++++++---- test/gateways/monei_test.exs | 8 +- test/integration/gateways/monei_test.exs | 4 +- 3 files changed, 143 insertions(+), 34 deletions(-) diff --git a/lib/gringotts/gateways/monei.ex b/lib/gringotts/gateways/monei.ex index 94990a92..a575f429 100644 --- a/lib/gringotts/gateways/monei.ex +++ b/lib/gringotts/gateways/monei.ex @@ -1,19 +1,24 @@ defmodule Gringotts.Gateways.Monei do @moduledoc ~S""" - An API client for the [MONEI](https://www.monei.net) gateway. + [MONEI](https://www.monei.net) gateway implementation. For reference see [MONEI's API (v1) documentation](https://docs.monei.net). The following features of MONEI are implemented: - | `type` | Action | Method | - | ------ | ------ | ------ | - | `PA` | Pre-authorize | `authorize/3` | - | `CP` | Capture | `capture/3` | - | `DB` | Debit | `purchase/3` | - | `RF` | Refund | `refund/3` | - | `RV` | Reversal | `void/2` | - | | Tokenization / Registrations | `store/2` | + | Action | Method | `type` | + | ------ | ------ | ------ | + | Pre-authorize | `authorize/3` | `PA` | + | Capture | `capture/3` | `CP` | + | Refund | `refund/3` | `RF` | + | Reversal | `void/2` | `RV` | + | Debit | `purchase/3` | `DB` | + | Tokenization / Registrations | `store/2` | | + + > **What's this last column `type`?**\ + > That's the `paymentType` of the request, which you can ignore unless you'd + > like to contribute to this module. Please read the [MONEI + > Guides](https://docs.monei.net). ## The `opts` argument @@ -33,14 +38,65 @@ defmodule Gringotts.Gateways.Monei do | `shipping_address` | | Not implemented | | `shipping_customer` | | Not implemented | - ## MONEI _quirks_ + > All these keys are being implemented, track progress in + > [issue #36](https://github.com/aviabird/gringotts/issues)! - * MONEI does not process money in cents, and the `amount` is rounded to 2 decimal places. + ## Registering your MONEI account at `Gringotts` + + After [making an account on MONEI](https://dashboard.monei.net/signin), head + to the dashboard and find your account "secrets" in the `Sub-Accounts > Overview` section. + + Here's how the secrets map to the required configuration parameters for MONEI: - ## Caveats + | Config parameter | MONEI secret | + | ------- | ---- | + | `:userId` | **User ID** | + | `:entityId` | **Channel ID** | + | `:password` | **Password** | + + Your Application config **must include the `:userId`, `:entityId`, `:password` + fields** and would look something like this: + + config :gringotts, Gringotts.Gateways.Monei, + adapter: Gringotts.Gateways.Monei, + userId: "your_secret_user_id", + password: "your_secret_password", + entityId: "your_secret_channel_id" - Although MONEI supports payments from [various cards](https://support.monei.net/charges-and-refunds/accepted-credit-cards-payment-methods), banks and virtual accounts (like some wallets), this library only accepts payments by (supported) cards. + ## Scope of this module, and _quirks_ + + * MONEI does not process money in cents, and the `amount` is rounded to 2 decimal places. + * Although MONEI supports payments from [various + cards](https://support.monei.net/charges-and-refunds/accepted-credit-cards-payment-methods), + banks and virtual accounts (like some wallets), this library only accepts + payments by (supported) cards. + + ## Following the examples + + 1. First, set up a sample application and configure it to work with MONEI. + - You could do that from scratch by following our [Getting Started](#) guide. + - To save you time, we recommend [cloning our example + repo](https://github.com/aviabird/gringotts_example) that gives you a + pre-configured sample app ready-to-go. + + You could use the same config or update it the with your "secrets" + that you see in `Dashboard > Sub-accounts` as described + [above](#module-registering-your-monei-account-at-gringotts). + + 2. Run an `iex` session with `iex -S mix` and add some variable bindings and + aliases to it (to save some time): + ``` + iex> alias Gringotts.{Response, CreditCard, Gateways.Monei} + iex> opts = [currency: "EUR"] # The default currency is EUR, and this is just for an example. + iex> card = %CreditCard{first_name: "Jo", + last_name: "Doe", + number: "4200000000000000", + year: 2019, month: 12, + verification_code: "123", brand: "VISA"} + ``` + + We'll be using these in the examples below. + ## TODO * [Backoffice operations](https://docs.monei.net/tutorials/manage-payments/backoffice) @@ -49,12 +105,12 @@ defmodule Gringotts.Gateways.Monei do * [Recurring payments](https://docs.monei.net/recurring) * [Reporting](https://docs.monei.net/tutorials/reporting) """ - + use Gringotts.Gateways.Base use Gringotts.Adapter, required_config: [:userId, :entityId, :password] import Poison, only: [decode: 1] alias Gringotts.{CreditCard, Response} - + @base_url "https://test.monei-api.net" @default_headers ["Content-Type": "application/x-www-form-urlencoded", "charset": "UTF-8"] @@ -94,10 +150,19 @@ defmodule Gringotts.Gateways.Monei do * `capture/3` _an_ amount. * `void/2` a pre-authorization. - ### Note + ## Note A stand-alone pre-authorization [expires in 72hrs](https://docs.monei.net/tutorials/manage-payments/backoffice). + + ## Example + + The following session shows how one would (pre) authorize a payment of $40 on a sample `card`. + + iex> opts = [currency: "EUR"] # The default currency is EUR, and this is just for an example. + iex> card = %Gringotts.CreditCard{first_name: "Jo", last_name: "Doe", number: "4200000000000000", year: 2019, month: 12, verification_code: "123", brand: "VISA"} + iex> auth_result = Gringotts.authorize(:payment_worker, Gringotts.Gateways.Monei, 40, card, opts) + iex> auth_result.id # This is the authorization ID """ @spec authorize(number, CreditCard, keyword) :: Response def authorize(amount, card = %CreditCard{}, opts) when is_integer(amount) do @@ -118,13 +183,22 @@ defmodule Gringotts.Gateways.Monei do `amount` is transferred to the merchant account by MONEI when it is smaller or equal to the amount used in the pre-authorization referenced by `paymentId`. - ### Note + ## Note MONEI allows partial captures and unlike many other gateways, does not release the remaining amount back to the payment source. Thus, the same pre-authorisation ID can be used to perform multiple captures, till: * all the pre-authorized amount is captured or, * the remaining amount is explicitly "reversed" via `void/2`. **[citation-needed]** + + ## Example + + The following session shows how one would (partially) capture a previously + authorized a payment worth $35 by referencing the obtained authorization `id`. + + iex> opts = [currency: "EUR"] # The default currency is EUR, and this is just for an example. + iex> card = %Gringotts.CreditCard{first_name: "Jo", last_name: "Doe", number: "4200000000000000", year: 2019, month: 12, verification_code: "123", brand: "VISA"} + iex> capture_result = Gringotts.capture(:payment_worker, Gringotts.Gateways.Monei, 35, auth_result.id, opts) """ @spec capture(number, String.t, keyword) :: Response def capture(amount, paymentId, opts) @@ -145,6 +219,15 @@ defmodule Gringotts.Gateways.Monei do MONEI attempts to process a purchase on behalf of the customer, by debiting `amount` from the customer's account by charging the customer's `card`. + + ## Example + + The following session shows how one would process a payment in one-shot, + without (pre) authorization. + + iex> opts = [currency: "EUR"] # The default currency is EUR, and this is just for an example. + iex> card = %Gringotts.CreditCard{first_name: "Jo", last_name: "Doe", number: "4200000000000000", year: 2019, month: 12, verification_code: "123", brand: "VISA"} + iex> purchase_result = Gringotts.purchase(:payment_worker, Gringotts.Gateways.Monei, 40, card, opts) """ @spec purchase(number, CreditCard, keyword) :: Response def purchase(amount, card = %CreditCard{}, opts) when is_integer(amount) do purchase(amount / 1, card, opts) end @@ -179,6 +262,16 @@ defmodule Gringotts.Gateways.Monei do MONEI will reverse the payment, by sending all the amount back to the customer. Note that this is not the same as `refund/3`. + + ## Example + + The following session shows how one would void a previous (pre) + authorization. Remember that our `capture/3` example only did a partial + capture. + + iex> opts = [currency: "EUR"] # The default currency is EUR, and this is just for an example. + iex> card = %Gringotts.CreditCard{first_name: "Jo", last_name: "Doe", number: "4200000000000000", year: 2019, month: 12, verification_code: "123", brand: "VISA"} + iex> void_result = Gringotts.void(:payment_worker, Gringotts.Gateways.Monei, auth_result.id, opts) """ @spec void(String.t, keyword) :: Response def void(paymentId, opts) @@ -198,6 +291,15 @@ defmodule Gringotts.Gateways.Monei do Refer MONEI's [Backoffice Operations](https://docs.monei.net/tutorials/manage-payments/backoffice) guide. + + ## Example + + The following session shows how one would refund a previous purchase (and + similarily for captures). + + iex> opts = [currency: "EUR"] # The default currency is EUR, and this is just for an example. + iex> card = %Gringotts.CreditCard{first_name: "Jo", last_name: "Doe", number: "4200000000000000", year: 2019, month: 12, verification_code: "123", brand: "VISA"} + iex> refund_result = Gringotts.refund(:payment_worker, Gringotts.Gateways.Monei, purchase_result.id, opts) """ @spec refund(number, String.t, keyword) :: Response def refund(amount, paymentId, opts) when is_integer(amount) do @@ -222,10 +324,19 @@ defmodule Gringotts.Gateways.Monei do It is recommended to associate these details with a "Customer" by passing customer details in the `opts`. - ### Note + ## Note * _One-Click_ and _Recurring_ payments are currently not implemented. * Payment details can be saved during a `purchase/3` or `capture/3`. + + ## Example + + The following session shows how one would store a card (a payment-source) for + future use. + + iex> opts = [currency: "EUR"] # The default currency is EUR, and this is just for an example. + iex> card = %Gringotts.CreditCard{first_name: "Jo", last_name: "Doe", number: "4200000000000000", year: 2019, month: 12, verification_code: "123", brand: "VISA"} + iex> store_result = Gringotts.store(:payment_worker, Gringotts.Gateways.Monei, card, opts) """ @spec store(CreditCard, keyword) :: Response def store(card = %CreditCard{}, opts) do @@ -258,13 +369,11 @@ defmodule Gringotts.Gateways.Monei do "paymentBrand": card.brand] end - @doc """ - Makes the request to MONEI's network. - """ + # Makes the request to MONEI's network. @spec commit(atom, String.t, keyword, keyword) :: {:ok, HTTPoison.Response} | {:error, HTTPoison.Error} - def commit(method, endpoint, params, opts) do + defp commit(method, endpoint, params, opts) do auth_params = ["authentication.userId": opts[:userId], "authentication.password": opts[:password], "authentication.entityId": opts[:entityId]] @@ -276,15 +385,13 @@ defmodule Gringotts.Gateways.Monei do end end - @doc """ - Parses MONEI's response and returns a `Gringotts.Response` struct in a `:ok`, `:error` tuple. - """ + # Parses MONEI's response and returns a `Gringotts.Response` struct in a `:ok`, `:error` tuple. @spec respond(term) :: {:ok, Response} | {:error, Response} - def respond(monei_response) + defp respond(monei_response) - def respond({:ok, %{status_code: 200, body: body}}) do + defp respond({:ok, %{status_code: 200, body: body}}) do case decode(body) do {:ok, decoded_json} -> case verification_result(decoded_json) do {:ok, results} -> {:ok, Response.success([{:id, decoded_json["id"]} | results])} @@ -294,11 +401,11 @@ defmodule Gringotts.Gateways.Monei do end end - def respond({:ok, %{status_code: status_code, body: body}}) do + defp respond({:ok, %{status_code: status_code, body: body}}) do {:error, Response.error(code: status_code, raw: body)} end - def respond({:error, %HTTPoison.Error{} = error}) do + defp respond({:error, %HTTPoison.Error{} = error}) do {:error, Response.error(code: error.id, reason: :network_fail?, description: "HTTPoison says '#{error.reason}'")} end diff --git a/test/gateways/monei_test.exs b/test/gateways/monei_test.exs index f40bd785..9d627567 100644 --- a/test/gateways/monei_test.exs +++ b/test/gateways/monei_test.exs @@ -169,8 +169,9 @@ defmodule Gringotts.Gateways.MoneiTest do {:ok, response} = Gateway.void("7214344252e11af79c0b9e7b4f3f6234", [config: auth]) assert response.code == "000.100.110" end - - test "respond | various scenarios." do + + @tag :skip + test "respond | various scenarios, can't test a private function." do json_200 = %HTTPoison.Response{body: @auth_success, status_code: 200} json_not_200 = %HTTPoison.Response{body: @auth_success, status_code: 300} html_200 = %HTTPoison.Response{body: ~s[\n], status_code: 200} @@ -184,5 +185,6 @@ end defmodule Gringotts.Gateways.MoneiDocTest do use ExUnit.Case, async: true - doctest Gringotts.Gateways.Monei + # doctest Gringotts.Gateways.Monei + # doctests will never work. Track progress: https://github.com/aviabird/gringotts/issues/37 end diff --git a/test/integration/gateways/monei_test.exs b/test/integration/gateways/monei_test.exs index 68041860..04624f31 100644 --- a/test/integration/gateways/monei_test.exs +++ b/test/integration/gateways/monei_test.exs @@ -19,7 +19,7 @@ defmodule Gringotts.Integration.Gateways.MoneiTest do } setup_all do - Application.put_env(:Gringotts, Gringotts.Gateways.Monei, [adapter: Gringotts.Gateways.Monei, + Application.put_env(:gringotts, Gringotts.Gateways.Monei, [adapter: Gringotts.Gateways.Monei, userId: "8a8294186003c900016010a285582e0a", password: "hMkqf2qbWf", entityId: "8a82941760036820016010a28a8337f6"]) @@ -58,7 +58,7 @@ defmodule Gringotts.Integration.Gateways.MoneiTest do end test "Environment setup" do - config = Application.get_env(:Gringotts, Gringotts.Gateways.Monei) + config = Application.get_env(:gringotts, Gringotts.Gateways.Monei) assert config[:adapter] == Gringotts.Gateways.Monei end From 39fa64456dfed427817e743991ee0c51d188c669 Mon Sep 17 00:00:00 2001 From: Ananya Bahadur Date: Fri, 22 Dec 2017 18:59:01 +0530 Subject: [PATCH 15/17] Makes Travis run integration tests (#40) Fixes #13 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 10803242..82c3f5a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ before_install: - mix local.rebar --force - mix deps.get script: - - mix coveralls.travis --trace + - mix coveralls.travis --include integration after_script: - MIX_ENV=docs mix deps.get - MIX_ENV=docs mix inch.report From 6ea9b149871a3ef2c8ed20b3b0fc8490dc2906c6 Mon Sep 17 00:00:00 2001 From: Sagar Karwande Date: Fri, 22 Dec 2017 19:39:41 +0530 Subject: [PATCH 16/17] Repsonse handling (#33) * add spec for public methods * add docs to gitignore * basic doc * basic response handling * minor doc fix * add docs and refactor parser --- lib/gringotts/gateways/paymill.ex | 317 +++++++++++++++++++++++++++--- 1 file changed, 294 insertions(+), 23 deletions(-) diff --git a/lib/gringotts/gateways/paymill.ex b/lib/gringotts/gateways/paymill.ex index f44bfdbe..ae4e34d4 100644 --- a/lib/gringotts/gateways/paymill.ex +++ b/lib/gringotts/gateways/paymill.ex @@ -1,6 +1,34 @@ defmodule Gringotts.Gateways.Paymill do + @moduledoc """ + An Api Client for the [PAYMILL](https://www.paymill.com/) gateway. + + For refernce see [PAYMILL's API (v2.1) documentation](https://developers.paymill.com/API/index) + + The following features of PAYMILL are implemented: + + | Action | Method | + | ------ | ------ | + | Authorize | `authorize/3` | + | Capture | `capture/3` | + | Purchase | `purchase/3` | + | Void | `void/2` | + + Following fields are required for config + + | Config Parameter | PAYMILL secret | + | private_key | **your_private_key** | + | public_key | **your_public_key** | + + Your application config must include 'private_key', 'public_key' + + config :gringotts, Gringotts.Gateways.Paymill, + adapter: Gringotts.Gateways.Paymill, + private_key: "your_privat_key", + public_key: "your_public_key" + """ use Gringotts.Gateways.Base alias Gringotts.{ CreditCard, Address, Response} + alias Gringotts.Gateways.Paymill.ResponseHandler, as: ResponseParser use Gringotts.Adapter, required_config: [:private_key, :public_key] @@ -10,36 +38,118 @@ defmodule Gringotts.Gateways.Paymill do @live_url "https://api.paymill.com/v2.1/" @headers [{"Content-Type", "application/x-www-form-urlencoded"}] - def save_card(card, options) do - {:ok, %HTTPoison.Response{body: response}} = HTTPoison.get( - get_save_card_url(), - get_headers(options), - params: get_save_card_params(card, options)) + @doc """ + Authorize a card with particular amount and return a token in response - parse_card_response(response) - end + ### Example + amount = 100 + + card = %CreditCard{ + first_name: "Sagar", + last_name: "Karwande", + number: "4111111111111111", + month: 12, + year: 2018, + verification_code: 123 + } + options = [] + + iex> Gringotts.authorize(:payment_worker, Gringotts.Gateways.Paymill, amount, card, options) + """ + @spec authorize(number, String.t | CreditCard, Keyword) :: {:ok | :error, Response} def authorize(amount, card_or_token, options) do Keyword.put(options, :money, amount) action_with_token(:authorize, amount, card_or_token, options) end + @doc """ + Purchase with a card + + ### Example + amount = 100 + + card = %CreditCard{ + first_name: "Sagar", + last_name: "Karwande", + number: "4111111111111111", + month: 12, + year: 2018, + verification_code: 123 + } + + options = [] + + iex> Gringotts.purchase(:payment_worker, Gringotts.Gateways.Paymill, amount, card, options) + """ + @spec purchase(number, CreditCard, Keyword) :: {:ok | :error, Response} def purchase(amount, card, options) do Keyword.put(options, :money, amount) action_with_token(:purchase, amount, card, options) end - def capture(amount, authorization, options) do - post = add_amount([], amount, options) ++ [{"token", authorization}] + @doc """ + Capture a particular amount with authorization token + + ### Example + amount = 100 + + token = "preauth_14c7c5268eb155a599f0" + + options = [] + + iex> Gringotts.capture(:payment_worker, Gringotts.Gateways.Paymill, token, amount, options) + """ + @spec capture(String.t, number, Keyword) :: {:ok | :error, Response} + def capture(authorization, amount, options) do + post = add_amount([], amount, options) ++ [{"preauthorization", authorization}] commit(:post, "transactions", post, options) end + @doc """ + Voids a particular authorized amount + + ### Example + token = "preauth_14c7c5268eb155a599f0" + + options = [] + + iex> Gringotts.void(:payment_worker, Gringotts.Gateways.Paymill, token, options) + """ + @spec void(String.t, Keyword) :: {:ok | :error, Response} def void(authorization, options) do commit(:delete, "preauthorizations/#{authorization}", [], options) end - def save(card, options) do + @doc false + @spec authorize_with_token(number, String.t, Keyword) :: term + def authorize_with_token(money, card_token, options) do + post = add_amount([], money, options) ++ [{"token", card_token}] + + commit(:post, "preauthorizations", post, options) + end + + @doc false + @spec purchase_with_token(number, String.t, Keyword) :: term + def purchase_with_token(money, card_token, options) do + post = add_amount([], money, options) ++ [{"token", card_token}] + + commit(:post, "transactions", post, options) + end + + @spec save_card(CreditCard, Keyword) :: Response + defp save_card(card, options) do + {:ok, %HTTPoison.Response{body: response}} = HTTPoison.get( + get_save_card_url(), + get_headers(options), + params: get_save_card_params(card, options)) + + parse_card_response(response) + end + + @spec save(CreditCard, Keyword) :: Response + defp save(card, options) do save_card(card, options) end @@ -54,19 +164,7 @@ defmodule Gringotts.Gateways.Paymill do apply(__MODULE__, String.to_atom("#{action}_with_token"), [amount, card_token , options]) end - def authorize_with_token(money, card_token, options) do - post = add_amount([], money, options) ++ [{"token", card_token}] - - commit(:post, "preauthorizations", post, options) - end - - def purchase_with_token(money, card_token, options) do - post = add_amount([], money, options) ++ [{"token", card_token}] - - commit(:post, "transactions", post, options) - end - - def get_save_card_params(card, options) do + defp get_save_card_params(card, options) do [ {"transaction.mode" , "CONNECTOR_TEST"}, {"channel.id" , get_config(:public_key, options)}, {"jsonPFunction" , "jsonPFunction"}, @@ -111,10 +209,183 @@ defmodule Gringotts.Gateways.Paymill do defp commit(method, action, parameters \\ nil, options) do HTTPoison.request(method, @live_url <> action, {:form, parameters }, get_headers(options), []) + |> ResponseParser.parse end defp get_config(key, options) do get_in(options, [:config, key]) end + defmodule ResponseHandler do + alias Gringotts.Response + + @response_code %{ + 10001 => "Undefined response", + 10002 => "Waiting for something", + 11000 => "Retry request at a later time", + + 20000 => "Operation successful", + 20100 => "Funds held by acquirer", + 20101 => "Funds held by acquirer because merchant is new", + 20200 => "Transaction reversed", + 20201 => "Reversed due to chargeback", + 20202 => "Reversed due to money-back guarantee", + 20203 => "Reversed due to complaint by buyer", + 20204 => "Payment has been refunded", + 20300 => "Reversal has been canceled", + 22000 => "Initiation of transaction successful", + + 30000 => "Transaction still in progress", + 30100 => "Transaction has been accepted", + 31000 => "Transaction pending", + 31100 => "Pending due to address", + 31101 => "Pending due to uncleared eCheck", + 31102 => "Pending due to risk review", + 31103 => "Pending due regulatory review", + 31104 => "Pending due to unregistered/unconfirmed receiver", + 31200 => "Pending due to unverified account", + 31201 => "Pending due to non-captured funds", + 31202 => "Pending due to international account (accept manually)", + 31203 => "Pending due to currency conflict (accept manually)", + 31204 => "Pending due to fraud filters (accept manually)", + + 40000 => "Problem with transaction data", + 40001 => "Problem with payment data", + 40002 => "Invalid checksum", + 40100 => "Problem with credit card data", + 40101 => "Problem with CVV", + 40102 => "Card expired or not yet valid", + 40103 => "Card limit exceeded", + 40104 => "Card is not valid", + 40105 => "Expiry date not valid", + 40106 => "Credit card brand required", + 40200 => "Problem with bank account data", + 40201 => "Bank account data combination mismatch", + 40202 => "User authentication failed", + 40300 => "Problem with 3-D Secure data", + 40301 => "Currency/amount mismatch", + 40400 => "Problem with input data", + 40401 => "Amount too low or zero", + 40402 => "Usage field too long", + 40403 => "Currency not allowed", + 40410 => "Problem with shopping cart data", + 40420 => "Problem with address data", + 40500 => "Permission error with acquirer API", + 40510 => "Rate limit reached for acquirer API", + 42000 => "Initiation of transaction failed", + 42410 => "Initiation of transaction expired", + + 50000 => "Problem with back end", + 50001 => "Country blacklisted", + 50002 => "IP address blacklisted", + 50004 => "Live mode not allowed", + 50005 => "Insufficient permissions (API key)", + 50100 => "Technical error with credit card", + 50101 => "Error limit exceeded", + 50102 => "Card declined", + 50103 => "Manipulation or stolen card", + 50104 => "Card restricted", + 50105 => "Invalid configuration data", + 50200 => "Technical error with bank account", + 50201 => "Account blacklisted", + 50300 => "Technical error with 3-D Secure", + 50400 => "Declined because of risk issues", + 50401 => "Checksum was wrong", + 50402 => "Bank account number was invalid (formal check)", + 50403 => "Technical error with risk check", + 50404 => "Unknown error with risk check", + 50405 => "Unknown bank code", + 50406 => "Open chargeback", + 50407 => "Historical chargeback", + 50408 => "Institution / public bank account (NCA)", + 50409 => "KUNO/Fraud", + 50410 => "Personal Account Protection (PAP)", + 50420 => "Rejected due to acquirer fraud settings", + 50430 => "Rejected due to acquirer risk settings", + 50440 => "Failed due to restrictions with acquirer account", + 50450 => "Failed due to restrictions with user account", + 50500 => "General timeout", + 50501 => "Timeout on side of the acquirer", + 50502 => "Risk management transaction timeout", + 50600 => "Duplicate operation", + 50700 => "Cancelled by user", + 50710 => "Failed due to funding source", + 50711 => "Payment method not usable, use other payment method", + 50712 => "Limit of funding source was exceeded", + 50713 => "Means of payment not reusable (canceled by user)", + 50714 => "Means of payment not reusable (expired)", + 50720 => "Rejected by acquirer", + 50730 => "Transaction denied by merchant", + 50800 => "Preauthorisation failed", + 50810 => "Authorisation has been voided", + 50820 => "Authorisation period expired" + } + + def parse({:ok, %HTTPoison.Response{body: body, status_code: 200}}) do + body = Poison.decode!(body) + parse_body(body) + end + def parse({:ok, %HTTPoison.Response{body: body, status_code: 400}}) do + body = Poison.decode!(body) + [] + |> set_params(body) + end + def parse({:ok, %HTTPoison.Response{body: body, status_code: 404}}) do + body = Poison.decode!(body) + [] + |> set_success(body) + |> set_params(body) + |> handle_opts() + end + + defp set_success(opts, %{"error" => error}) do + opts ++ [message: error, success: false] + end + defp set_success(opts, %{"transaction" => %{ "response_code" => 20000}}) do + opts ++ [success: true] + end + + defp parse_body(%{"data" => data}) do + [] + |> set_success(data) + |> parse_authorization(data) + |> parse_status_code(data) + |> set_params(data) + |> handle_opts() + end + + defp handle_opts(opts) do + case Keyword.fetch(opts, :success) do + {:ok, true} -> {:ok, Response.success(opts)} + {:ok, false} -> {:error, Response.error(opts)} + end + end + + #Status code + defp parse_status_code(opts, %{"status" => "failed"} = body) do + response_code = get_in(body, ["transaction", "response_code"]) + response_msg = Map.get(@response_code, response_code, -1) + opts ++ [message: response_msg] + end + defp parse_status_code(opts, %{ "transaction" => transaction}) do + response_code = Map.get(transaction, "response_code", -1) + response_msg = Map.get(@response_code, response_code, -1) + opts ++ [status_code: response_code, message: response_msg] + end + defp parse_status_code(opts, %{"response_code" => code}) do + response_msg = Map.get(@response_code, code, -1) + opts ++ [status_code: code, message: response_msg] + end + + #Authorization + defp parse_authorization(opts, %{"status" => "failed"}) do + opts ++ [success: false] + end + defp parse_authorization(opts, %{ "id" => id} = auth) do + opts ++ [authorization: id] + end + + defp set_params(opts, body), do: opts ++ [params: body] + end + end From 30e42ce9883806aa7183363bda88f0a209f11acb Mon Sep 17 00:00:00 2001 From: Chandra Shekhar Date: Fri, 22 Dec 2017 20:15:49 +0530 Subject: [PATCH 17/17] Stripe (#43) * updated stripe docs * typo bug fix --- lib/gringotts/gateways/stripe.ex | 232 +++++++++++++++++++++---------- 1 file changed, 155 insertions(+), 77 deletions(-) diff --git a/lib/gringotts/gateways/stripe.ex b/lib/gringotts/gateways/stripe.ex index 482f0b31..382505e2 100644 --- a/lib/gringotts/gateways/stripe.ex +++ b/lib/gringotts/gateways/stripe.ex @@ -1,23 +1,65 @@ defmodule Gringotts.Gateways.Stripe do - + @moduledoc """ - Functions for working with Stripe payment gateway. Through this API you can: - - * Authorize payment source and use it later for payment. - * Purchase with payment source. - * Capture a payment for already authorized payment source. - * Void the payment for payment source. - * Refund amount to payment source. - * Store payment source for making purchases later. - * Unstore payment source. + Stripe gateway implementation. For reference see [Stripe's API documentation](https://stripe.com/docs/api). + The following features of Stripe are implemented: + + | Action | Method | + | ------ | ------ | + | Pre-authorize | `authorize/3` | + | Capture | `capture/3` | + | Refund | `refund/3` | + | Reversal | `void/2` | + | Debit | `purchase/3` | + | Store | `store/2` | + | Unstore | `unstore/2` | + + ## The `opts` argument + Most `Gringotts` API calls accept an optional `Keyword` list `opts` to supply + optional arguments for transactions with the Stripe gateway. The following keys + are supported: + + | Key | Remark | Status | + | ---- | --- | ---- | + | `currency` | | **Implemented** | + | `capture` | | **Implemented** | + | `description` | | **Implemented** | + | `metadata` | | **Implemented** | + | `receipt_email` | | **Implemented** | + | `shipping` | | **Implemented** | + | `customer` | | **Implemented** | + | `source` | | **Implemented** | + | `statement_descriptor` | | **Implemented** | + | `charge` | | **Implemented** | + | `reason` | | **Implemented** | + | `account_balance` | | Not implemented | + | `business_vat_id` | | Not implemented | + | `coupon` | | Not implemented | + | `default_source` | | Not implemented | + | `email` | | Not implemented | + | `shipping` | | Not implemented | + + ## Registering your Stripe account at `Gringotts` + After [making an account on Stripe](https://stripe.com/), head + to the dashboard and find your account `secrets` in the `API` section. + + ## Here's how the secrets map to the required configuration parameters for Stripe: + | Config parameter | Stripe secret | + | ------- | ---- | + | `:secret_key` | **Secret key** | + + Your Application config must look something like this: - Stripe API reference: https://stripe.com/docs/api + config :gringotts, Gringotts.Gateways.Stripe, + adapter: Gringotts.Gateways.Stripe, + secret_key: "your_secret_key", + default_currency: "usd" """ @base_url "https://api.stripe.com/v1" use Gringotts.Gateways.Base - use Gringotts.Adapter, required_config: [:api_key, :default_currency] + use Gringotts.Adapter, required_config: [:secret_key, :default_currency] alias Gringotts.{ CreditCard, @@ -25,20 +67,30 @@ defmodule Gringotts.Gateways.Stripe do } @doc """ - Authorize payment source. + Performs a (pre) Authorize operation. - Authorize the payment source for a customer or card using amount and opts. - opts must include the default currency. + The authorization validates the card details with the banking network, + places a hold on the transaction amount in the customer’s issuing bank and + also triggers risk management. Funds are not transferred. + + Stripe returns an `charge_id` which should be stored at your side and can be used later to: + * `capture/3` an amount. + * `void/2` a pre-authorization. + + ## Note + Uncaptured charges expire in 7 days. For more information, [see authorizing charges and settling later](https://support.stripe.com/questions/can-i-authorize-a-charge-and-then-wait-to-settle-it-later). - ## Examples - payment = %{ - expiration: {2018, 12}, number: "4242424242424242", cvc: "123", name: "John Doe", - street1: "123 Main", street2: "Suite 100", city: "New York", region: "NY", country: "US", - postal_code: "11111" - } + ## Example + The following session shows how one would (pre) authorize a payment of $10 on a sample `card`. + + iex> payment = %{ + expiration: {2018, 12}, number: "4242424242424242", cvc: "123", name: "John Doe", + street1: "123 Main", street2: "Suite 100", city: "New York", region: "NY", country: "US", + postal_code: "11111" + } - opts = [currency: "usd"] - amount = 5 + iex> opts = [currency: "usd"] + iex> amount = 10 iex> Gringotts.authorize(:payment_worker, Gringotts.Gateways.Stripe, amount, payment, opts) """ @@ -49,20 +101,23 @@ defmodule Gringotts.Gateways.Stripe do end @doc """ - Purchase with payment source. - - Purchase with the payment source using amount and opts. - opts must include the default currency. + Transfers amount from the customer to the merchant. + + Stripe attempts to process a purchase on behalf of the customer, by debiting + amount from the customer's account by charging the customer's card. + + ## Example + The following session shows how one would process a payment in one-shot, + without (pre) authorization. - ## Examples - payemnt = %{ - expiration: {2018, 12}, number: "4242424242424242", cvc: "123", name: "John Doe", - street1: "123 Main", street2: "Suite 100", city: "New York", region: "NY", country: "US", - postal_code: "11111" - } + iex> payemnt = %{ + expiration: {2018, 12}, number: "4242424242424242", cvc: "123", name: "John Doe", + street1: "123 Main", street2: "Suite 100", city: "New York", region: "NY", country: "US", + postal_code: "11111" + } - opts = [currency: "usd"] - amount = 5 + iex> opts = [currency: "usd"] + iex> amount = 5 iex> Gringotts.purchase(:payment_worker, Gringotts.Gateways.Stripe, amount, payment, opts) """ @@ -73,20 +128,22 @@ defmodule Gringotts.Gateways.Stripe do end @doc """ - Captures a payment. + Captures a pre-authorized amount. - Captures a payment with already authorized payment source. - Once the charge is captured, it cannot be captured again. - Amount less than or equal to authorized amount can be captured - but not more than that. - If less amount is captured than the authorized amount, then - remaining amount will be refunded back to the authorized - paymet source. + Amount is transferred to the merchant account by Stripe when it is smaller or + equal to the amount used in the pre-authorization referenced by `charge_id`. - ## Examples - id = "ch_1BYvGkBImdnrXiZwet3aKkQE" - amount = 5 - opts = [] + ## Note + Stripe allows partial captures and release the remaining amount back to the payment source. Thus, the same + pre-authorisation `charge_id` cannot be used to perform multiple captures. + + ## Example + The following session shows how one would (partially) capture a previously + authorized a payment worth $10 by referencing the obtained `charge_id`. + + iex> id = "ch_1BYvGkBImdnrXiZwet3aKkQE" + iex> amount = 5 + iex> opts = [] iex> Gringotts.capture(:payment_worker, Gringotts.Gateways.Stripe, id, amount, opts) """ @@ -97,13 +154,29 @@ defmodule Gringotts.Gateways.Stripe do end @doc """ - Voids the payment. - - Returns the captured amount to the authorized payment source. - - ## Examples - id = "ch_1BYvGkBImdnrXiZwet3aKkQE" - opts = [] + Voids the referenced payment. + + This method attempts a reversal of the either a previous `purchase/3` or + `authorize/3` referenced by `charge_id`. + As a consequence, the customer will never see any booking on his + statement. + + ## Voiding a previous authorization + Stripe will reverse the authorization by sending a "reversal request" to the + payment source (card issuer) to clear the funds held against the + authorization. + + ## Voiding a previous purchase + Stripe will reverse the payment, by sending all the amount back to the + customer. Note that this is not the same as `refund/3`. + + ## Example + The following session shows how one would void a previous (pre) + authorization. Remember that our `capture/3` example only did a partial + capture. + + iex> id = "ch_1BYvGkBImdnrXiZwet3aKkQE" + iex> opts = [] iex> Gringotts.void(:payment_worker, Gringotts.Gateways.Stripe, id, opts) """ @@ -114,17 +187,18 @@ defmodule Gringotts.Gateways.Stripe do end @doc """ - Refunds the amount. + Refunds the amount to the customer's card with reference to a prior transfer. - Returns the captured amount to the authorized payment source. - Less than or equal to the captured amount can be refunded. - If the refunded amount is less than the captured amount, then - remaining amount can be refunded again. + Stripe processes a full or partial refund worth `amount`, referencing a + previous `purchase/3` or `capture/3`. - ## Examples - amount = 5 - id = "ch_1BYvGkBImdnrXiZwet3aKkQE" - opts = [] + ## Example + The following session shows how one would refund a previous purchase (and + similarily for captures). + + iex> amount = 5 + iex> id = "ch_1BYvGkBImdnrXiZwet3aKkQE" + iex> opts = [] iex> Gringotts.refund(:payment_worker, Gringotts.Gateways.Stripe, amount, id, opts) """ @@ -135,19 +209,22 @@ defmodule Gringotts.Gateways.Stripe do end @doc """ - Stores the payment source. - - Store the payment source, so that it can be used - for capturing the amount at later stages. + Stores the payment-source data for later use. + + Stripe can store the payment-source details, for example card which can be used to effectively + to process One-Click and Recurring_ payments, and return a `customer_id` for reference. - ## Examples - payment = %{ - expiration: {2018, 12}, number: "4242424242424242", cvc: "123", name: "John Doe", - street1: "123 Main", street2: "Suite 100", city: "New York", region: "NY", country: "US", - postal_code: "11111" - } + ## Example + The following session shows how one would store a card (a payment-source) for + future use. + + iex> payment = %{ + expiration: {2018, 12}, number: "4242424242424242", cvc: "123", name: "John Doe", + street1: "123 Main", street2: "Suite 100", city: "New York", region: "NY", country: "US", + postal_code: "11111" + } - opts = [] + iex> opts = [] iex> Gringotts.store(:payment_worker, Gringotts.Gateways.Stripe, payment, opts) """ @@ -158,14 +235,15 @@ defmodule Gringotts.Gateways.Stripe do end @doc """ - Unstore the stored payment source. + Deletes previously stored payment-source data. - Unstore the already stored payment source, + Deletes the already stored payment source, so that it cannot be used again for capturing payments. ## Examples - id = "cus_BwpLX2x4ecEUgD" + The following session shows how one would unstore a already stored payment source. + iex> id = "cus_BwpLX2x4ecEUgD" iex> Gringotts.unstore(:payment_worker, Gringotts.Gateways.Stripe, id, opts) """