diff --git a/example/transaction/giroPay.js b/example/transaction/giroPay.js deleted file mode 100644 index 0b3a56b..0000000 --- a/example/transaction/giroPay.js +++ /dev/null @@ -1,20 +0,0 @@ -import buckarooClient from '../buckarooClient'; - -const giropay = buckarooClient.method('giropay'); - -//Pay -giropay - .pay({ - amountDebit: 10.1, - bic: 'XXXXXXXXX', - description: 'Giropay Payment', - }) - .request(); -//Refund -giropay - .refund({ - originalTransactionKey: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', - amountCredit: 10.1, - invoice: 'Giropay Refund', - }) - .request(); diff --git a/example/transaction/giroPay.ts b/example/transaction/giroPay.ts deleted file mode 100644 index 2b680eb..0000000 --- a/example/transaction/giroPay.ts +++ /dev/null @@ -1,20 +0,0 @@ -import buckarooClient from '../buckarooClient'; - -const giropay = buckarooClient.method('giropay'); - -//Pay -giropay - .pay({ - amountDebit: 10.1, - bic: 'XXXXXXXXX', - description: 'Giropay Payment', - }) - .request(); -//Refund -giropay - .refund({ - originalTransactionKey: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', - amountCredit: 10.1, - invoice: 'Giropay Refund', - }) - .request(); diff --git a/src/PaymentMethods/Giropay/Models/Pay.ts b/src/PaymentMethods/Giropay/Models/Pay.ts deleted file mode 100644 index 5991df9..0000000 --- a/src/PaymentMethods/Giropay/Models/Pay.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IPaymentRequest, ServiceParameter } from '../../../Models'; - -export interface IPay extends IPaymentRequest { - bic?: string; - costumerIBAN?: string; -} - -export class Pay extends ServiceParameter { - set bic(value: string) { - this.set('bic', value); - } - - set costumerIBAN(value: string) { - this.set('costumerIBAN', value); - } -} diff --git a/src/PaymentMethods/Giropay/index.ts b/src/PaymentMethods/Giropay/index.ts deleted file mode 100644 index 161fe21..0000000 --- a/src/PaymentMethods/Giropay/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { PayablePaymentMethod } from '../../Services'; -import { IPay, Pay } from './Models/Pay'; -import { ServiceCode } from '../../Utils'; - -export default class Giropay extends PayablePaymentMethod { - public defaultServiceCode(): ServiceCode { - return 'giropay'; - } - - pay(payload: IPay) { - return super.pay(payload, new Pay(payload)); - } -} diff --git a/src/PaymentMethods/index.ts b/src/PaymentMethods/index.ts index 05294f6..92e622b 100644 --- a/src/PaymentMethods/index.ts +++ b/src/PaymentMethods/index.ts @@ -61,7 +61,6 @@ export { default as customgiftcard } from './GiftCard'; export { default as customgiftcard2 } from './GiftCard'; export { default as customgiftcard3 } from './GiftCard'; -export { default as giropay } from './Giropay'; export { default as idealqr } from './IdealQR'; export { default as idin } from './Idin'; export { default as capayable } from './In3Old'; diff --git a/tests/PaymentMethods/GiroPay.test.ts b/tests/PaymentMethods/GiroPay.test.ts deleted file mode 100644 index 40a18f5..0000000 --- a/tests/PaymentMethods/GiroPay.test.ts +++ /dev/null @@ -1,29 +0,0 @@ -import buckarooClientTest from '../BuckarooClient.test'; -import { uniqid } from '../../src'; - -const method = buckarooClientTest.method('giropay'); -describe('Testing Giropay methods', () => { - test('Pay', async () => { - return method - .pay({ - bic: 'XXXXXXXXX', - amountDebit: 100, - }) - .request() - .then((response) => { - expect(response.isPendingProcessing()).toBeTruthy(); - }); - }); - test('Refund', async () => { - return method - .refund({ - amountCredit: 0.01, - invoice: uniqid(), - originalTransactionKey: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', - }) - .request() - .then((response) => { - expect(response.isFailed()).toBeTruthy(); - }); - }); -});