@sourceloop/payment-service / Exports / PaypalProvider
Class: PaypalProvider¶
Implements¶
Provider
<PayPalPaymentGateway
>
Table of contents¶
Constructors¶
Properties¶
Methods¶
Constructors¶
constructor¶
• new PaypalProvider(transactionsRepository
, ordersRepository
, subscriptionsRepository
, logger
, config?
)
Parameters¶
Name | Type |
---|---|
transactionsRepository |
TransactionsRepository |
ordersRepository |
OrdersRepository |
subscriptionsRepository |
SubscriptionsRepository |
logger |
ILogger |
config? |
IPayPalConfig |
Defined in¶
services/payment-service/src/providers/paypal/paypal-provider.service.ts:28
Properties¶
client¶
• client: PayPalHttpClient
Defined in¶
services/payment-service/src/providers/paypal/paypal-provider.service.ts:27
config¶
• Private
Optional
Readonly
config: IPayPalConfig
Defined in¶
services/payment-service/src/providers/paypal/paypal-provider.service.ts:37
environment¶
• environment: SandboxEnvironment
| LiveEnvironment
Defined in¶
services/payment-service/src/providers/paypal/paypal-provider.service.ts:26
logger¶
• logger: ILogger
Defined in¶
services/payment-service/src/providers/paypal/paypal-provider.service.ts:35
ordersRepository¶
• Private
Readonly
ordersRepository: OrdersRepository
Defined in¶
services/payment-service/src/providers/paypal/paypal-provider.service.ts:32
subscriptionsRepository¶
• Private
Readonly
subscriptionsRepository: SubscriptionsRepository
Defined in¶
services/payment-service/src/providers/paypal/paypal-provider.service.ts:34
transactionsRepository¶
• Private
Readonly
transactionsRepository: TransactionsRepository
Defined in¶
services/payment-service/src/providers/paypal/paypal-provider.service.ts:30
Methods¶
value¶
▸ value(): Object
Returns¶
Object
Name | Type |
---|---|
charge |
(chargeResponse : { orderId : string }) => Promise <{ orderId : undefined | string = orderDetails.id; res : ResponseMessage = ResponseMessage.Sucess }> |
create |
(payorder : Orders , paymentTemplate : string ) => Promise <{ orderId : undefined | string = payorder.id; orderPayLink : undefined = payorder.metaData.paypalOrderPayLink; payOrderId : undefined = order.id; res : string = 'Payment already Done for this Order'; status : Status = Status.AlreadyPaid } | { orderId : undefined | string = payorder.id; orderPayLink : any = payorder.metaData.paypalOrderPayLink; payOrderId : any = order.id; res : undefined = 'Payment already Done for this Order'; status : undefined = Status.AlreadyPaid }> |
refund |
(transactionId : string , note? : string ) => Promise <any > |
subscriptionCharge |
(chargeResponse : AnyObject ) => Promise <void > |
subscriptionCreate |
(subscriptions : Subscriptions , paymentTemplate : string ) => Promise <{ res : string = '' }> |
subscriptionWebHook |
(sub : DataObject <{}>) => Promise <void > |
Implementation of¶
Provider.value
Defined in¶
services/payment-service/src/providers/paypal/paypal-provider.service.ts:57