export const getSubscription = () => ({
    url: 'payments/subscription',
    method: 'get'
});

export const queryInvoices = ({ Page, PageSize, Owner, State, Type }) => ({
    url: 'payments/invoices',
    method: 'get',
    params: { Page, PageSize, Owner, State, Type }
});

export const getInvoice = (ID) => ({
    url: `payments/invoices/${ID}`,
    method: 'get',
    output: 'arrayBuffer'
});

export const queryPaymentMethods = () => ({
    url: 'payments/methods',
    method: 'get'
});

export const setPaymentMethod = (data) => ({
    url: 'payments/methods',
    method: 'post',
    data
});

export const deletePaymentMethod = (ID) => ({
    url: `payments/methods/${ID}`,
    method: 'delete'
});

export const createBitcoinPayment = ({ Amount, Currency }) => ({
    url: 'payments/bcinfo',
    method: 'post',
    data: { Amount, Currency }
});

export const payInvoice = (invoiceID, data) => ({
    url: `payments/invoices/${invoiceID}`,
    method: 'post',
    data
});

export const getPaymentMethodStatus = () => ({
    url: 'payments/status',
    method: 'get'
});

@@ -82,32 +82,135 @@
 hod: 'get'%0A%7D);%0A%0A
+export const deleteSubscription = () =%3E (%7B%0A    url: 'payments/subscription',%0A    method: 'delete'%0A%7D);%0A%0A
 export const que
@@ -366,32 +366,165 @@
 te, Type %7D%0A%7D);%0A%0A
+export const queryPlans = (Currency, Cycle) =%3E (%7B%0A    url: 'payments/plans',%0A    method: 'get',%0A    params: %7B Currency, Cycle %7D%0A%7D);%0A%0A
 export const get
@@ -530,24 +530,31 @@
 tInvoice = (
+invoice
 ID) =%3E (%7B%0A  
@@ -577,24 +577,31 @@
 /invoices/$%7B
+invoice
 ID%7D%60,%0A    me
@@ -640,24 +640,176 @@
 uffer'%0A%7D);%0A%0A
+export const checkInvoice = (invoiceID, GiftCode) =%3E (%7B%0A    url: %60payments/invoices/$%7BinvoiceID%7D/check%60,%0A    method: 'put',%0A    data: %7B GiftCode %7D%0A%7D);%0A%0A
 export const
@@ -1036,16 +1036,22 @@
 thod = (
+method
 ID) =%3E (
@@ -1081,16 +1081,22 @@
 thods/$%7B
+method
 ID%7D%60,%0A  
@@ -1156,18 +1156,16 @@
 ment = (
-%7B 
 Amount, 
@@ -1172,18 +1172,16 @@
 Currency
- %7D
 ) =%3E (%7B%0A
@@ -1256,32 +1256,176 @@
 Currency %7D%0A%7D);%0A%0A
+export const createPayPalPayment = (Amount, Currency) =%3E (%7B%0A    url: 'payments/paypal',%0A    method: 'post',%0A    data: %7B Amount, Currency %7D%0A%7D);%0A%0A
 export const pay

Add payments routes