/** * MIT License * * Copyright (c) 2019 Kasun Vithanage * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * */ import { P24Options } from './P24Options'; import { Order, Transaction } from '../orders'; import { Verification, NotificationRequest } from '../verify'; import { RefundRequest, RefundResult } from '../refund'; /** * Represents a P24 payment system * * @export * @class P24 */ export declare class P24 { private merchantId; private posId; private crcKey; private apiKey; private client; private baseUrl; private options; private baseParameters; /** * Creates an instance of Przelewy24. * @param {number} merchantId Merchant ID given by Przelewy24 * @param {number} posId Shop ID (defaults to merchantId) * @param {string} apiKey API Key from P24 panel(Klucz do raportów) * @param {string} crcKey CRC key from P24 panel * @param {P24Options} [options={ sandbox: false }] - additional options * @memberof P24 */ constructor(merchantId: number, posId: number, apiKey: string, crcKey: string, options?: P24Options); /** * Test access to the service * * @returns {Promise} * @throws {P24Error} * @memberof P24 */ testAccess(): Promise; /** * Creates a transaction * * @param {Order} order - order to be created * @returns {Promise} * @throws {P24Error} * @memberof P24 */ createTransaction(order: Order): Promise; /** * Verify transaction * * @param {Verification} verification - verification request * @returns {Promise} * @throws {P24Error} * @memberof P24 */ verifyTransaction(verification: Verification): Promise; /** * Verify notification transaction with our CRC Key * * @param {NotificationRequest} notificationRequest * @returns {boolean} * @memberof P24 */ verifyNotification(notificationRequest: NotificationRequest): boolean; /** * Handle refund * * @param {RefundRequest} refundRequest * @returns {Promise} * @memberof P24 */ refund(refundRequest: RefundRequest): Promise; /** * Validates IP with P24 backends * * @static * @param {string} ip - IP Address * @returns {boolean} - true on validated ip * @memberof Przelewy24 */ static isIpValid(ip: string): boolean; } //# sourceMappingURL=P24.d.ts.map