Skip to content

Commit

Permalink
Merge pull request #430 from farahalymangopay/master
Browse files Browse the repository at this point in the history
Add StatementDescriptor to Refund and Apple Pay PayIn
  • Loading branch information
iulian03 authored Feb 7, 2025
2 parents e1e4be7 + 63d197a commit e574849
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/models/Refund.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ var Refund = Transaction.extend({
DebitedWalletId: null,
CreditedWalletId: null,
RefundReason: null,
Reference: null
Reference: null,
StatementDescriptor: null
}),

getSubObjects: function() {
Expand Down
1 change: 1 addition & 0 deletions typings/enums.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export namespace enums {
Multibanco: "MULTIBANCO";
Satispay: "SATISPAY";
Blik: "BLIK";
ApplePay: "APPLEPAY";
GooglePay: "GOOGLE_PAY";
Klarna: "KLARNA";
Ideal: "IDEAL";
Expand Down
85 changes: 85 additions & 0 deletions typings/models/payIn.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export namespace payIn {
| MultibancoWebPayInData
| SatispayWebPayInData
| BlikWebPayInData
| ApplePayPayInData
| GooglePayDirectPayInData
| KlarnaWebPayInData
| IdealWebPayInData
Expand Down Expand Up @@ -1650,6 +1651,90 @@ export namespace payIn {
Fees: MoneyData;
}

interface CreateApplePayPayIn {
ExecutionType: "DIRECT";

PaymentType: "APPLE";
/**
* A user's ID
*/
AuthorId: string;

/**
* The ID of the wallet where money will be credited
*/
CreditedWalletId: string;

/**
* Information about the funds that are being debited
*/
DebitedFunds: MoneyData;

/**
* Information about the fees that were taken by the client for this transaction (and were hence transferred to the Client's platform wallet)
*/
Fees: MoneyData;

PaymentData: ApplePayPaymentData;

/**
* A custom description to appear on the user's bank statement. It can be up to 10 characters long, and can only include alphanumeric characters or spaces.
* See here for important info. Note that each bank handles this information differently, some show less or no information.
*/
StatementDescriptor?: string;

/**
* Custom data that you can add to this item
*/
Tag?: string;
}
interface ApplePayPayInData extends BasePayInData {
ExecutionType: "DIRECT";

PaymentType: "APPLE";
/**
* A user's ID
*/
AuthorId: string;

/**
* The ID of the wallet where money will be credited
*/
CreditedWalletId: string;

/**
* Information about the funds that are being debited
*/
DebitedFunds: MoneyData;

/**
* Information about the fees that were taken by the client for this transaction (and were hence transferred to the Client's platform wallet)
*/
Fees: MoneyData;

PaymentData: ApplePayPaymentData;

/**
* A custom description to appear on the user's bank statement. It can be up to 10 characters long, and can only include alphanumeric characters or spaces.
* See here for important info. Note that each bank handles this information differently, some show less or no information.
*/
StatementDescriptor?: string;

/**
* Custom data that you can add to this item
*/
Tag?: string;
}

interface ApplePayPaymentData {
TransactionId: string,

Network: string,

TokenData: string
}


interface CreateGooglePayDirectPayIn {
ExecutionType: "DIRECT";

Expand Down
2 changes: 1 addition & 1 deletion typings/models/refund.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export namespace refund {
/**
* Custom description to appear on the user’s bank statement along with the platform name
*/
StatementDescriptor?: string;
StatementDescriptor?: string;
}

interface CreateTransferRefund {
Expand Down
1 change: 1 addition & 0 deletions typings/services/PayIns.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export class PayIns {
MethodOverload<payIn.CreateMultibancoWebPayIn, payIn.MultibancoWebPayInData> &
MethodOverload<payIn.CreateSatispayWebPayIn, payIn.SatispayWebPayInData> &
MethodOverload<payIn.CreateBlikWebPayIn, payIn.BlikWebPayInData> &
MethodOverload<payIn.CreateApplePayPayIn, payIn.ApplePayPayInData> &
MethodOverload<payIn.CreateGooglePayDirectPayIn, payIn.GooglePayDirectPayInData> &
MethodOverload<payIn.CreateKlarnaWebPayIn, payIn.KlarnaWebPayInData> &
MethodOverload<payIn.CreateIdealWebPayIn, payIn.IdealWebPayInData> &
Expand Down

0 comments on commit e574849

Please sign in to comment.