taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

test-pay.rst (958B)


      1 .. ts:op:: testPay
      2 
      3   Make a test payment using a test deployment of the exchange and
      4   merchant.  Creates an order for ``amount`` with the given ``summary``
      5   at the merchant and pays it.
      6 
      7   **Request:**
      8 
      9     The request must be a `TestPayArgs` object.
     10 
     11   **Response:**
     12 
     13     On success, the result is a `TestPayResult` object.
     14 
     15   **Side effects:**
     16 
     17     Creates an order and makes a real payment at the test merchant over
     18     the network.
     19 
     20 .. ts:def:: TestPayArgs
     21 
     22   interface TestPayArgs {
     23     merchantBaseUrl: string;
     24     merchantAuthToken?: string;
     25     amount: AmountString;
     26     summary: string;
     27     forcedCoinSel?: ForcedCoinSel;
     28   }
     29 
     30 .. ts:def:: ForcedCoinSel
     31 
     32   // Forced coin selection for deposits/payments.
     33   interface ForcedCoinSel {
     34     coins: {
     35       value: AmountString;
     36       contribution: AmountString;
     37     }[];
     38   }
     39 
     40 .. ts:def:: TestPayResult
     41 
     42   interface TestPayResult {
     43     // Number of coins used for the payment.
     44     numCoins: number;
     45   }