leichter / cwrx

(Old) Cinema6 API
0 stars 0 forks source link

Allow setting subscription-related fields on transactions #962

Closed leichter closed 8 years ago

leichter commented 8 years ago

Fields can now be set on body of POST /api/transactions as well as body of POST /api/payments.

From here on, for POST /api/payments requests, fields that are intended to be passed straight to the transaction should be set in a transaction hash on the body, e.g.:

// POST /api/payments
options.json = {
    amount: 100.0,
    paymentMethod: 'token1',
    transaction: {  // fields in here are used for the transaction, but not the payment
        targetUsers: 9001,
        description: 'foobar'
    }
};

Previously, we allowed setting the description on the top-level of the body; this is still supported, but should be considered deprecated.

Fixes #958 cc @minznerjosh