diff --git a/example/transaction/ideal.js b/example/transaction/ideal.js index 0abfce4..d08c0bf 100644 --- a/example/transaction/ideal.js +++ b/example/transaction/ideal.js @@ -4,6 +4,7 @@ const ideal = buckarooClient.method('ideal'); ideal .pay({ amountDebit: 10.1, + shippingCosts: 0.01, issuer: 'ABNANL2A', description: 'Ideal Payment' }) @@ -21,6 +22,7 @@ ideal .payFastCheckout({ currency: 'EUR', amountDebit: 10.1, + shippingCosts: 0.01, invoice: 'Ideal Pay Fast Checkout', }) //Issuers diff --git a/example/transaction/ideal.ts b/example/transaction/ideal.ts index 0c35d84..96daaed 100644 --- a/example/transaction/ideal.ts +++ b/example/transaction/ideal.ts @@ -6,6 +6,7 @@ const ideal = buckarooClient.method('ideal'); ideal .pay({ amountDebit: 10.1, + shippingCosts: 0.01, issuer: 'ABNANL2A', description: 'Ideal Payment', }) @@ -22,6 +23,7 @@ ideal ideal.payFastCheckout({ currency: 'EUR', amountDebit: 10.1, + shippingCosts: 0.01, invoice: 'Ideal Pay Fast Checkout', }); diff --git a/src/PaymentMethods/Ideal/Models/Pay.ts b/src/PaymentMethods/Ideal/Models/Pay.ts index b331299..c6f418e 100644 --- a/src/PaymentMethods/Ideal/Models/Pay.ts +++ b/src/PaymentMethods/Ideal/Models/Pay.ts @@ -2,10 +2,15 @@ import { IPaymentRequest, ServiceParameter } from '../../../Models'; export interface IPay extends IPaymentRequest { issuer?: string; + shippingCosts?: number; } export class Pay extends ServiceParameter { set issuer(value: string) { this.set('issuer', value); } + + set shippingCosts(value: number) { + this.set('shippingCosts', value); + } } diff --git a/tests/PaymentMethods/Ideal.test.ts b/tests/PaymentMethods/Ideal.test.ts index 14e43d1..a56ac3d 100644 --- a/tests/PaymentMethods/Ideal.test.ts +++ b/tests/PaymentMethods/Ideal.test.ts @@ -12,6 +12,7 @@ describe('testing Ideal methods', () => { return ideal .pay({ amountDebit: 100, + shippingCosts: 0.01, issuer: 'ABNANL2A', continueOnIncomplete: false, additionalParameters: { @@ -60,6 +61,7 @@ describe('testing Ideal methods', () => { invoice: uniqid(), currency: 'EUR', amountDebit: 0.01, + shippingCosts: 0.01, }) .request() .then((data) => {