Skip to content

Commit

Permalink
fix(paypal): add optional details param to paypalpayment
Browse files Browse the repository at this point in the history
  • Loading branch information
ihadeed committed Oct 9, 2016
1 parent 3dd6a92 commit 7200845
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/plugins/pay-pal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,19 +138,12 @@ export interface PayPalEnvironment {
* @private
*/
export class PayPalPayment {
/**
* Convenience constructor.
* Returns a PayPalPayment with the specified amount, currency code, and short description.
* @param {String} amount: The amount of the payment.
* @param {String} currency: The ISO 4217 currency for the payment.
* @param {String} shortDescription: A short description of the payment.
* @param {String} intent: "Sale" for an immediate payment.
*/
constructor(amount: string, currency: string, shortDescription: string, intent: string) {
constructor(amount: string, currency: string, shortDescription: string, intent: string, details?: PayPalPaymentDetails) {
this.amount = amount;
this.currency = currency;
this.shortDescription = shortDescription;
this.intent = intent;
this.details = details;
}

/**
Expand Down Expand Up @@ -198,6 +191,11 @@ export class PayPalPayment {
* Optional customer shipping address, if your app wishes to provide this to the SDK.
*/
shippingAddress: string;

/**
* Optional PayPalPaymentDetails object
*/
details: PayPalPaymentDetails;
}

/**
Expand Down

0 comments on commit 7200845

Please sign in to comment.