@phonepe-pg/pg-sdk-node 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +221 -0
- package/dist/src/Env.d.ts +4 -0
- package/dist/src/Env.js +23 -0
- package/dist/src/EnvConfig.d.ts +11 -0
- package/dist/src/EnvConfig.js +42 -0
- package/dist/src/common/BaseClient.d.ts +33 -0
- package/dist/src/common/BaseClient.js +103 -0
- package/dist/src/common/CommonUtils.d.ts +9 -0
- package/dist/src/common/CommonUtils.js +45 -0
- package/dist/src/common/configs/CredentialConfig.d.ts +25 -0
- package/dist/src/common/configs/CredentialConfig.js +64 -0
- package/dist/src/common/configs/index.d.ts +1 -0
- package/dist/src/common/configs/index.js +32 -0
- package/dist/src/common/constants/BaseUrl.d.ts +12 -0
- package/dist/src/common/constants/BaseUrl.js +30 -0
- package/dist/src/common/constants/Headers.d.ts +16 -0
- package/dist/src/common/constants/Headers.js +36 -0
- package/dist/src/common/events/Constants.d.ts +10 -0
- package/dist/src/common/events/Constants.js +29 -0
- package/dist/src/common/events/EventQueueHandler.d.ts +11 -0
- package/dist/src/common/events/EventQueueHandler.js +57 -0
- package/dist/src/common/events/builders/BaseEventBuilder.d.ts +17 -0
- package/dist/src/common/events/builders/BaseEventBuilder.js +46 -0
- package/dist/src/common/events/builders/EventBuillder.d.ts +16 -0
- package/dist/src/common/events/builders/EventBuillder.js +195 -0
- package/dist/src/common/events/builders/EventDataBuilder.d.ts +55 -0
- package/dist/src/common/events/builders/EventDataBuilder.js +115 -0
- package/dist/src/common/events/models/BaseEvent.d.ts +11 -0
- package/dist/src/common/events/models/BaseEvent.js +31 -0
- package/dist/src/common/events/models/BulkEvent.d.ts +18 -0
- package/dist/src/common/events/models/BulkEvent.js +56 -0
- package/dist/src/common/events/models/EventData.d.ts +32 -0
- package/dist/src/common/events/models/EventData.js +53 -0
- package/dist/src/common/events/models/enums/EventState.d.ts +5 -0
- package/dist/src/common/events/models/enums/EventState.js +24 -0
- package/dist/src/common/events/models/enums/EventType.d.ts +19 -0
- package/dist/src/common/events/models/enums/EventType.js +38 -0
- package/dist/src/common/events/models/enums/FlowType.d.ts +3 -0
- package/dist/src/common/events/models/enums/FlowType.js +22 -0
- package/dist/src/common/events/publisher/DefaultEventPublisher.d.ts +7 -0
- package/dist/src/common/events/publisher/DefaultEventPublisher.js +31 -0
- package/dist/src/common/events/publisher/EventPublisher.d.ts +6 -0
- package/dist/src/common/events/publisher/EventPublisher.js +21 -0
- package/dist/src/common/events/publisher/EventPublisherFactory.d.ts +9 -0
- package/dist/src/common/events/publisher/EventPublisherFactory.js +38 -0
- package/dist/src/common/events/publisher/QueuedEventPublisher.d.ts +21 -0
- package/dist/src/common/events/publisher/QueuedEventPublisher.js +124 -0
- package/dist/src/common/exception/Constants.d.ts +3 -0
- package/dist/src/common/exception/Constants.js +24 -0
- package/dist/src/common/exception/Exceptions.d.ts +45 -0
- package/dist/src/common/exception/Exceptions.js +102 -0
- package/dist/src/common/exception/index.d.ts +1 -0
- package/dist/src/common/exception/index.js +32 -0
- package/dist/src/common/http/HttpCommand.d.ts +15 -0
- package/dist/src/common/http/HttpCommand.js +93 -0
- package/dist/src/common/http/HttpMethodType.d.ts +4 -0
- package/dist/src/common/http/HttpMethodType.js +23 -0
- package/dist/src/common/http/PhonePeResponse.d.ts +12 -0
- package/dist/src/common/http/PhonePeResponse.js +21 -0
- package/dist/src/common/http/index.d.ts +2 -0
- package/dist/src/common/http/index.js +33 -0
- package/dist/src/common/index.d.ts +5 -0
- package/dist/src/common/index.js +36 -0
- package/dist/src/common/models/MetaInfo.d.ts +26 -0
- package/dist/src/common/models/MetaInfo.js +61 -0
- package/dist/src/common/models/PaymentFlow.d.ts +5 -0
- package/dist/src/common/models/PaymentFlow.js +24 -0
- package/dist/src/common/models/PaymentFlowType.d.ts +4 -0
- package/dist/src/common/models/PaymentFlowType.js +23 -0
- package/dist/src/common/models/PgV2InstrumentType.d.ts +9 -0
- package/dist/src/common/models/PgV2InstrumentType.js +28 -0
- package/dist/src/common/models/index.d.ts +6 -0
- package/dist/src/common/models/index.js +37 -0
- package/dist/src/common/models/request/AccountConstraint.d.ts +18 -0
- package/dist/src/common/models/request/AccountConstraint.js +49 -0
- package/dist/src/common/models/request/DeviceContext.d.ts +17 -0
- package/dist/src/common/models/request/DeviceContext.js +46 -0
- package/dist/src/common/models/request/InstrumentConstraint.d.ts +5 -0
- package/dist/src/common/models/request/InstrumentConstraint.js +24 -0
- package/dist/src/common/models/request/PaymentInstrumentType.d.ts +3 -0
- package/dist/src/common/models/request/PaymentInstrumentType.js +22 -0
- package/dist/src/common/models/request/RefundRequest.d.ts +20 -0
- package/dist/src/common/models/request/RefundRequest.js +51 -0
- package/dist/src/common/models/request/index.d.ts +5 -0
- package/dist/src/common/models/request/index.js +36 -0
- package/dist/src/common/models/request/instruments/BillingAddress.d.ts +29 -0
- package/dist/src/common/models/request/instruments/BillingAddress.js +60 -0
- package/dist/src/common/models/request/instruments/CardPayRequestBuilder.d.ts +39 -0
- package/dist/src/common/models/request/instruments/CardPayRequestBuilder.js +113 -0
- package/dist/src/common/models/request/instruments/CardPaymentV2Instrument.d.ts +22 -0
- package/dist/src/common/models/request/instruments/CardPaymentV2Instrument.js +56 -0
- package/dist/src/common/models/request/instruments/CollectPaymentDetails.d.ts +5 -0
- package/dist/src/common/models/request/instruments/CollectPaymentDetails.js +24 -0
- package/dist/src/common/models/request/instruments/CollectPaymentDetailsType.d.ts +4 -0
- package/dist/src/common/models/request/instruments/CollectPaymentDetailsType.js +23 -0
- package/dist/src/common/models/request/instruments/CollectPaymentV2Instrument.d.ts +19 -0
- package/dist/src/common/models/request/instruments/CollectPaymentV2Instrument.js +49 -0
- package/dist/src/common/models/request/instruments/Expiry.d.ts +14 -0
- package/dist/src/common/models/request/instruments/Expiry.js +43 -0
- package/dist/src/common/models/request/instruments/IntentPaymentV2Instrument.d.ts +12 -0
- package/dist/src/common/models/request/instruments/IntentPaymentV2Instrument.js +41 -0
- package/dist/src/common/models/request/instruments/NetBankingPayRequestBuilder.d.ts +25 -0
- package/dist/src/common/models/request/instruments/NetBankingPayRequestBuilder.js +71 -0
- package/dist/src/common/models/request/instruments/NetBankingPaymentV2Instrument.d.ts +15 -0
- package/dist/src/common/models/request/instruments/NetBankingPaymentV2Instrument.js +46 -0
- package/dist/src/common/models/request/instruments/NewCardDetails.d.ts +29 -0
- package/dist/src/common/models/request/instruments/NewCardDetails.js +61 -0
- package/dist/src/common/models/request/instruments/PaymentV2Instrument.d.ts +7 -0
- package/dist/src/common/models/request/instruments/PaymentV2Instrument.js +24 -0
- package/dist/src/common/models/request/instruments/PhoneNumberCollectPaymentDetails.d.ts +12 -0
- package/dist/src/common/models/request/instruments/PhoneNumberCollectPaymentDetails.js +41 -0
- package/dist/src/common/models/request/instruments/TokenDetails.d.ts +39 -0
- package/dist/src/common/models/request/instruments/TokenDetails.js +81 -0
- package/dist/src/common/models/request/instruments/TokenPayRequestBuilder.d.ts +41 -0
- package/dist/src/common/models/request/instruments/TokenPayRequestBuilder.js +118 -0
- package/dist/src/common/models/request/instruments/TokenPaymentV2Instrument.d.ts +19 -0
- package/dist/src/common/models/request/instruments/TokenPaymentV2Instrument.js +51 -0
- package/dist/src/common/models/request/instruments/UpiCollectPayViaPhoneNumberRequestBuilder.d.ts +25 -0
- package/dist/src/common/models/request/instruments/UpiCollectPayViaPhoneNumberRequestBuilder.js +73 -0
- package/dist/src/common/models/request/instruments/UpiCollectPayViaVpaRequestBuilder.d.ts +25 -0
- package/dist/src/common/models/request/instruments/UpiCollectPayViaVpaRequestBuilder.js +71 -0
- package/dist/src/common/models/request/instruments/UpiIntentPayRequestBuilder.d.ts +25 -0
- package/dist/src/common/models/request/instruments/UpiIntentPayRequestBuilder.js +71 -0
- package/dist/src/common/models/request/instruments/UpiQrPaymentV2Instrument.d.ts +9 -0
- package/dist/src/common/models/request/instruments/UpiQrPaymentV2Instrument.js +36 -0
- package/dist/src/common/models/request/instruments/UpiQrRequestBuilder.d.ts +19 -0
- package/dist/src/common/models/request/instruments/UpiQrRequestBuilder.js +55 -0
- package/dist/src/common/models/request/instruments/VpaCollectPaymentDetails.d.ts +12 -0
- package/dist/src/common/models/request/instruments/VpaCollectPaymentDetails.js +41 -0
- package/dist/src/common/models/request/instruments/index.d.ts +21 -0
- package/dist/src/common/models/request/instruments/index.js +52 -0
- package/dist/src/common/models/response/CallbackData.d.ts +17 -0
- package/dist/src/common/models/response/CallbackData.js +21 -0
- package/dist/src/common/models/response/CallbackResponse.d.ts +6 -0
- package/dist/src/common/models/response/CallbackResponse.js +21 -0
- package/dist/src/common/models/response/CallbackType.d.ts +11 -0
- package/dist/src/common/models/response/CallbackType.js +30 -0
- package/dist/src/common/models/response/InstrumentCombo.d.ts +15 -0
- package/dist/src/common/models/response/InstrumentCombo.js +21 -0
- package/dist/src/common/models/response/OrderStatusResponse.d.ts +16 -0
- package/dist/src/common/models/response/OrderStatusResponse.js +21 -0
- package/dist/src/common/models/response/PaymentDetail.d.ts +24 -0
- package/dist/src/common/models/response/PaymentDetail.js +21 -0
- package/dist/src/common/models/response/PaymentRefundDetail.d.ts +24 -0
- package/dist/src/common/models/response/PaymentRefundDetail.js +21 -0
- package/dist/src/common/models/response/RefundResponse.d.ts +5 -0
- package/dist/src/common/models/response/RefundResponse.js +21 -0
- package/dist/src/common/models/response/RefundStatusResponse.d.ts +9 -0
- package/dist/src/common/models/response/RefundStatusResponse.js +21 -0
- package/dist/src/common/models/response/index.d.ts +11 -0
- package/dist/src/common/models/response/index.js +42 -0
- package/dist/src/common/models/response/paymentinstruments/AccountInstrumentV2.d.ts +10 -0
- package/dist/src/common/models/response/paymentinstruments/AccountInstrumentV2.js +22 -0
- package/dist/src/common/models/response/paymentinstruments/CreditCardPaymentInstrumentV2.d.ts +7 -0
- package/dist/src/common/models/response/paymentinstruments/CreditCardPaymentInstrumentV2.js +22 -0
- package/dist/src/common/models/response/paymentinstruments/DebitCardPaymentInstrumentV2.d.ts +7 -0
- package/dist/src/common/models/response/paymentinstruments/DebitCardPaymentInstrumentV2.js +22 -0
- package/dist/src/common/models/response/paymentinstruments/EgvPaymentInstrumentV2.d.ts +5 -0
- package/dist/src/common/models/response/paymentinstruments/EgvPaymentInstrumentV2.js +22 -0
- package/dist/src/common/models/response/paymentinstruments/NetbankingPaymentInstrumentV2.d.ts +7 -0
- package/dist/src/common/models/response/paymentinstruments/NetbankingPaymentInstrumentV2.js +22 -0
- package/dist/src/common/models/response/paymentinstruments/PaymentInstrumentType.d.ts +8 -0
- package/dist/src/common/models/response/paymentinstruments/PaymentInstrumentType.js +27 -0
- package/dist/src/common/models/response/paymentinstruments/PaymentInstrumentV2.d.ts +4 -0
- package/dist/src/common/models/response/paymentinstruments/PaymentInstrumentV2.js +21 -0
- package/dist/src/common/models/response/paymentinstruments/WalletPaymentInstrumentV2.d.ts +4 -0
- package/dist/src/common/models/response/paymentinstruments/WalletPaymentInstrumentV2.js +22 -0
- package/dist/src/common/models/response/paymentinstruments/index.d.ts +8 -0
- package/dist/src/common/models/response/paymentinstruments/index.js +39 -0
- package/dist/src/common/models/response/rails/PaymentRail.d.ts +9 -0
- package/dist/src/common/models/response/rails/PaymentRail.js +28 -0
- package/dist/src/common/models/response/rails/PgPaymentRail.d.ts +6 -0
- package/dist/src/common/models/response/rails/PgPaymentRail.js +22 -0
- package/dist/src/common/models/response/rails/PpiEgvPaymentRail.d.ts +3 -0
- package/dist/src/common/models/response/rails/PpiEgvPaymentRail.js +22 -0
- package/dist/src/common/models/response/rails/PpiWalletPaymentRail.d.ts +3 -0
- package/dist/src/common/models/response/rails/PpiWalletPaymentRail.js +22 -0
- package/dist/src/common/models/response/rails/UpiPaymentRail.d.ts +6 -0
- package/dist/src/common/models/response/rails/UpiPaymentRail.js +22 -0
- package/dist/src/common/models/response/rails/index.d.ts +5 -0
- package/dist/src/common/models/response/rails/index.js +36 -0
- package/dist/src/common/tokenhandler/OAuthRequest.d.ts +6 -0
- package/dist/src/common/tokenhandler/OAuthRequest.js +17 -0
- package/dist/src/common/tokenhandler/OAuthResponse.d.ts +10 -0
- package/dist/src/common/tokenhandler/OAuthResponse.js +52 -0
- package/dist/src/common/tokenhandler/TokenConstants.d.ts +4 -0
- package/dist/src/common/tokenhandler/TokenConstants.js +23 -0
- package/dist/src/common/tokenhandler/TokenService.d.ts +22 -0
- package/dist/src/common/tokenhandler/TokenService.js +115 -0
- package/dist/src/common/tokenhandler/index.d.ts +2 -0
- package/dist/src/common/tokenhandler/index.js +33 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.js +35 -0
- package/dist/src/payments/v2/CustomCheckoutClient.d.ts +86 -0
- package/dist/src/payments/v2/CustomCheckoutClient.js +229 -0
- package/dist/src/payments/v2/StandardCheckoutClient.d.ts +86 -0
- package/dist/src/payments/v2/StandardCheckoutClient.js +227 -0
- package/dist/src/payments/v2/customcheckout/Constants.d.ts +9 -0
- package/dist/src/payments/v2/customcheckout/Constants.js +28 -0
- package/dist/src/payments/v2/index.d.ts +3 -0
- package/dist/src/payments/v2/index.js +34 -0
- package/dist/src/payments/v2/models/index.d.ts +2 -0
- package/dist/src/payments/v2/models/index.js +33 -0
- package/dist/src/payments/v2/models/request/CreateSdkOrderRequest.d.ts +63 -0
- package/dist/src/payments/v2/models/request/CreateSdkOrderRequest.js +130 -0
- package/dist/src/payments/v2/models/request/CustomCheckoutPayRequest.d.ts +37 -0
- package/dist/src/payments/v2/models/request/CustomCheckoutPayRequest.js +79 -0
- package/dist/src/payments/v2/models/request/MerchantUrls.d.ts +4 -0
- package/dist/src/payments/v2/models/request/MerchantUrls.js +24 -0
- package/dist/src/payments/v2/models/request/PgCheckoutPaymentFlow.d.ts +18 -0
- package/dist/src/payments/v2/models/request/PgCheckoutPaymentFlow.js +48 -0
- package/dist/src/payments/v2/models/request/PgPaymentFlow.d.ts +20 -0
- package/dist/src/payments/v2/models/request/PgPaymentFlow.js +50 -0
- package/dist/src/payments/v2/models/request/PrefillUserLoginDetails.d.ts +16 -0
- package/dist/src/payments/v2/models/request/PrefillUserLoginDetails.js +38 -0
- package/dist/src/payments/v2/models/request/StandardCheckoutPayRequest.d.ts +40 -0
- package/dist/src/payments/v2/models/request/StandardCheckoutPayRequest.js +82 -0
- package/dist/src/payments/v2/models/request/index.d.ts +7 -0
- package/dist/src/payments/v2/models/request/index.js +38 -0
- package/dist/src/payments/v2/models/response/CreateSdkOrderResponse.d.ts +6 -0
- package/dist/src/payments/v2/models/response/CreateSdkOrderResponse.js +21 -0
- package/dist/src/payments/v2/models/response/CustomCheckoutPayResponse.d.ts +8 -0
- package/dist/src/payments/v2/models/response/CustomCheckoutPayResponse.js +21 -0
- package/dist/src/payments/v2/models/response/StandardCheckoutPayResponse.d.ts +6 -0
- package/dist/src/payments/v2/models/response/StandardCheckoutPayResponse.js +21 -0
- package/dist/src/payments/v2/models/response/index.d.ts +3 -0
- package/dist/src/payments/v2/models/response/index.js +34 -0
- package/dist/src/payments/v2/standardcheckout/Constants.d.ts +9 -0
- package/dist/src/payments/v2/standardcheckout/Constants.js +28 -0
- package/package.json +58 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2025 Original Author(s), PhonePe India Pvt. Ltd.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.UpiCollectPayViaVpaRequestBuilder = void 0;
|
|
19
|
+
const CustomCheckoutPayRequest_1 = require("../../../../payments/v2/models/request/CustomCheckoutPayRequest");
|
|
20
|
+
const CollectPaymentV2Instrument_1 = require("./CollectPaymentV2Instrument");
|
|
21
|
+
const VpaCollectPaymentDetails_1 = require("./VpaCollectPaymentDetails");
|
|
22
|
+
const PgPaymentFlow_1 = require("../../../../payments/v2/models/request/PgPaymentFlow");
|
|
23
|
+
class UpiCollectPayViaVpaRequestBuilder {
|
|
24
|
+
constructor() {
|
|
25
|
+
/**
|
|
26
|
+
* SETTERS
|
|
27
|
+
*/
|
|
28
|
+
this.merchantOrderId = (merchantOrderId) => {
|
|
29
|
+
this._merchantOrderId = merchantOrderId;
|
|
30
|
+
return this;
|
|
31
|
+
};
|
|
32
|
+
this.amount = (amount) => {
|
|
33
|
+
this._amount = amount;
|
|
34
|
+
return this;
|
|
35
|
+
};
|
|
36
|
+
this.metaInfo = (metaInfo) => {
|
|
37
|
+
this._metaInfo = metaInfo;
|
|
38
|
+
return this;
|
|
39
|
+
};
|
|
40
|
+
this.constraints = (constraints) => {
|
|
41
|
+
this._constraints = constraints;
|
|
42
|
+
return this;
|
|
43
|
+
};
|
|
44
|
+
this.message = (message) => {
|
|
45
|
+
this._message = message;
|
|
46
|
+
return this;
|
|
47
|
+
};
|
|
48
|
+
this.vpa = (vpa) => {
|
|
49
|
+
this._vpa = vpa;
|
|
50
|
+
return this;
|
|
51
|
+
};
|
|
52
|
+
this.expireAfter = (expireAfter) => {
|
|
53
|
+
this._expireAfter = expireAfter;
|
|
54
|
+
return this;
|
|
55
|
+
};
|
|
56
|
+
this.deviceOS = (xDeviceOs) => {
|
|
57
|
+
this._deviceOS = xDeviceOs;
|
|
58
|
+
return this;
|
|
59
|
+
};
|
|
60
|
+
this.build = () => {
|
|
61
|
+
const paymentFlow = PgPaymentFlow_1.PgPaymentFlow.builder()
|
|
62
|
+
.paymentMode(CollectPaymentV2Instrument_1.CollectPaymentV2Instrument.builder()
|
|
63
|
+
.details(VpaCollectPaymentDetails_1.VpaCollectPaymentDetails.builder().vpa(this._vpa).build())
|
|
64
|
+
.message(this._message)
|
|
65
|
+
.build())
|
|
66
|
+
.build();
|
|
67
|
+
return new CustomCheckoutPayRequest_1.CustomCheckoutPayRequest(this._merchantOrderId, this._amount, paymentFlow, this._expireAfter, this._metaInfo, this._constraints, undefined, this._deviceOS);
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.UpiCollectPayViaVpaRequestBuilder = UpiCollectPayViaVpaRequestBuilder;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CustomCheckoutPayRequest } from '../../../../payments/v2/models/request/CustomCheckoutPayRequest';
|
|
2
|
+
import { InstrumentConstraint } from '../InstrumentConstraint';
|
|
3
|
+
import { MetaInfo } from '../../MetaInfo';
|
|
4
|
+
export declare class UpiIntentPayRequestBuilder {
|
|
5
|
+
private _merchantOrderId;
|
|
6
|
+
private _amount;
|
|
7
|
+
private _metaInfo?;
|
|
8
|
+
private _constraints?;
|
|
9
|
+
private _deviceOS?;
|
|
10
|
+
private _merchantCallBackScheme?;
|
|
11
|
+
private _targetApp?;
|
|
12
|
+
private _expireAfter?;
|
|
13
|
+
/**
|
|
14
|
+
* SETTERS
|
|
15
|
+
*/
|
|
16
|
+
merchantOrderId: (merchantOrderId: string) => this;
|
|
17
|
+
amount: (amount: number) => this;
|
|
18
|
+
metaInfo: (metaInfo: MetaInfo) => this;
|
|
19
|
+
constraints: (constraints: InstrumentConstraint[]) => void;
|
|
20
|
+
deviceOS: (deviceOS: string) => this;
|
|
21
|
+
merchantCallBackScheme: (merchantCallBackScheme: string) => this;
|
|
22
|
+
targetApp: (targetApp: string) => this;
|
|
23
|
+
expireAfter: (expireAfter: number) => this;
|
|
24
|
+
build: () => CustomCheckoutPayRequest;
|
|
25
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2025 Original Author(s), PhonePe India Pvt. Ltd.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.UpiIntentPayRequestBuilder = void 0;
|
|
19
|
+
const CustomCheckoutPayRequest_1 = require("../../../../payments/v2/models/request/CustomCheckoutPayRequest");
|
|
20
|
+
const DeviceContext_1 = require("../DeviceContext");
|
|
21
|
+
const IntentPaymentV2Instrument_1 = require("./IntentPaymentV2Instrument");
|
|
22
|
+
const PgPaymentFlow_1 = require("../../../../payments/v2/models/request/PgPaymentFlow");
|
|
23
|
+
class UpiIntentPayRequestBuilder {
|
|
24
|
+
constructor() {
|
|
25
|
+
/**
|
|
26
|
+
* SETTERS
|
|
27
|
+
*/
|
|
28
|
+
this.merchantOrderId = (merchantOrderId) => {
|
|
29
|
+
this._merchantOrderId = merchantOrderId;
|
|
30
|
+
return this;
|
|
31
|
+
};
|
|
32
|
+
this.amount = (amount) => {
|
|
33
|
+
this._amount = amount;
|
|
34
|
+
return this;
|
|
35
|
+
};
|
|
36
|
+
this.metaInfo = (metaInfo) => {
|
|
37
|
+
this._metaInfo = metaInfo;
|
|
38
|
+
return this;
|
|
39
|
+
};
|
|
40
|
+
this.constraints = (constraints) => {
|
|
41
|
+
this._constraints = constraints;
|
|
42
|
+
};
|
|
43
|
+
this.deviceOS = (deviceOS) => {
|
|
44
|
+
this._deviceOS = deviceOS;
|
|
45
|
+
return this;
|
|
46
|
+
};
|
|
47
|
+
this.merchantCallBackScheme = (merchantCallBackScheme) => {
|
|
48
|
+
this._merchantCallBackScheme = merchantCallBackScheme;
|
|
49
|
+
return this;
|
|
50
|
+
};
|
|
51
|
+
this.targetApp = (targetApp) => {
|
|
52
|
+
this._targetApp = targetApp;
|
|
53
|
+
return this;
|
|
54
|
+
};
|
|
55
|
+
this.expireAfter = (expireAfter) => {
|
|
56
|
+
this._expireAfter = expireAfter;
|
|
57
|
+
return this;
|
|
58
|
+
};
|
|
59
|
+
this.build = () => {
|
|
60
|
+
const paymentFlow = PgPaymentFlow_1.PgPaymentFlow.builder()
|
|
61
|
+
.paymentMode(IntentPaymentV2Instrument_1.IntentPaymentV2Instrument.builder().targetApp(this._targetApp).build())
|
|
62
|
+
.build();
|
|
63
|
+
const deviceContext = DeviceContext_1.DeviceContext.builder()
|
|
64
|
+
.deviceOS(this._deviceOS)
|
|
65
|
+
.merchantCallBackScheme(this._merchantCallBackScheme)
|
|
66
|
+
.build();
|
|
67
|
+
return new CustomCheckoutPayRequest_1.CustomCheckoutPayRequest(this._merchantOrderId, this._amount, paymentFlow, this._expireAfter, this._metaInfo, this._constraints, deviceContext);
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.UpiIntentPayRequestBuilder = UpiIntentPayRequestBuilder;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PaymentV2Instrument } from './PaymentV2Instrument';
|
|
2
|
+
export declare class UpiQrPaymentV2Instrument extends PaymentV2Instrument {
|
|
3
|
+
constructor();
|
|
4
|
+
static builder: () => UpiQrPaymentV2InstrumentBuilder;
|
|
5
|
+
}
|
|
6
|
+
declare class UpiQrPaymentV2InstrumentBuilder {
|
|
7
|
+
build: () => UpiQrPaymentV2Instrument;
|
|
8
|
+
}
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2025 Original Author(s), PhonePe India Pvt. Ltd.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.UpiQrPaymentV2Instrument = void 0;
|
|
19
|
+
const PgV2InstrumentType_1 = require("../../PgV2InstrumentType");
|
|
20
|
+
const PaymentV2Instrument_1 = require("./PaymentV2Instrument");
|
|
21
|
+
class UpiQrPaymentV2Instrument extends PaymentV2Instrument_1.PaymentV2Instrument {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(PgV2InstrumentType_1.PgV2InstrumentType.UPI_QR);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.UpiQrPaymentV2Instrument = UpiQrPaymentV2Instrument;
|
|
27
|
+
UpiQrPaymentV2Instrument.builder = () => {
|
|
28
|
+
return new UpiQrPaymentV2InstrumentBuilder();
|
|
29
|
+
};
|
|
30
|
+
class UpiQrPaymentV2InstrumentBuilder {
|
|
31
|
+
constructor() {
|
|
32
|
+
this.build = () => {
|
|
33
|
+
return new UpiQrPaymentV2Instrument();
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CustomCheckoutPayRequest } from '../../../../payments/v2/models/request/CustomCheckoutPayRequest';
|
|
2
|
+
import { InstrumentConstraint } from '../InstrumentConstraint';
|
|
3
|
+
import { MetaInfo } from '../../MetaInfo';
|
|
4
|
+
export declare class UpiQrRequestBuilder {
|
|
5
|
+
private _merchantOrderId;
|
|
6
|
+
private _amount;
|
|
7
|
+
private _metaInfo?;
|
|
8
|
+
private _constraints?;
|
|
9
|
+
private _expireAfter?;
|
|
10
|
+
/**
|
|
11
|
+
* SETTERS
|
|
12
|
+
*/
|
|
13
|
+
merchantOrderId: (merchantOrderId: string) => this;
|
|
14
|
+
amount: (amount: number) => this;
|
|
15
|
+
metaInfo: (metaInfo: MetaInfo) => this;
|
|
16
|
+
constraints: (constraints: InstrumentConstraint[]) => this;
|
|
17
|
+
expireAfter: (expireAfter: number) => this;
|
|
18
|
+
build: () => CustomCheckoutPayRequest;
|
|
19
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2025 Original Author(s), PhonePe India Pvt. Ltd.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.UpiQrRequestBuilder = void 0;
|
|
19
|
+
const CustomCheckoutPayRequest_1 = require("../../../../payments/v2/models/request/CustomCheckoutPayRequest");
|
|
20
|
+
const UpiQrPaymentV2Instrument_1 = require("./UpiQrPaymentV2Instrument");
|
|
21
|
+
const PgPaymentFlow_1 = require("../../../../payments/v2/models/request/PgPaymentFlow");
|
|
22
|
+
class UpiQrRequestBuilder {
|
|
23
|
+
constructor() {
|
|
24
|
+
/**
|
|
25
|
+
* SETTERS
|
|
26
|
+
*/
|
|
27
|
+
this.merchantOrderId = (merchantOrderId) => {
|
|
28
|
+
this._merchantOrderId = merchantOrderId;
|
|
29
|
+
return this;
|
|
30
|
+
};
|
|
31
|
+
this.amount = (amount) => {
|
|
32
|
+
this._amount = amount;
|
|
33
|
+
return this;
|
|
34
|
+
};
|
|
35
|
+
this.metaInfo = (metaInfo) => {
|
|
36
|
+
this._metaInfo = metaInfo;
|
|
37
|
+
return this;
|
|
38
|
+
};
|
|
39
|
+
this.constraints = (constraints) => {
|
|
40
|
+
this._constraints = constraints;
|
|
41
|
+
return this;
|
|
42
|
+
};
|
|
43
|
+
this.expireAfter = (expireAfter) => {
|
|
44
|
+
this._expireAfter = expireAfter;
|
|
45
|
+
return this;
|
|
46
|
+
};
|
|
47
|
+
this.build = () => {
|
|
48
|
+
const paymentFlow = PgPaymentFlow_1.PgPaymentFlow.builder()
|
|
49
|
+
.paymentMode(UpiQrPaymentV2Instrument_1.UpiQrPaymentV2Instrument.builder().build())
|
|
50
|
+
.build();
|
|
51
|
+
return new CustomCheckoutPayRequest_1.CustomCheckoutPayRequest(this._merchantOrderId, this._amount, paymentFlow, this._expireAfter, this._metaInfo, this._constraints);
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.UpiQrRequestBuilder = UpiQrRequestBuilder;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CollectPaymentDetails } from './CollectPaymentDetails';
|
|
2
|
+
export declare class VpaCollectPaymentDetails extends CollectPaymentDetails {
|
|
3
|
+
vpa: string;
|
|
4
|
+
constructor(vpa: string);
|
|
5
|
+
static builder: () => VpaCollectPaymentDetailsBuilder;
|
|
6
|
+
}
|
|
7
|
+
declare class VpaCollectPaymentDetailsBuilder {
|
|
8
|
+
private _vpa;
|
|
9
|
+
vpa: (vpa: string) => this;
|
|
10
|
+
build: () => VpaCollectPaymentDetails;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2025 Original Author(s), PhonePe India Pvt. Ltd.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.VpaCollectPaymentDetails = void 0;
|
|
19
|
+
const CollectPaymentDetails_1 = require("./CollectPaymentDetails");
|
|
20
|
+
const CollectPaymentDetailsType_1 = require("./CollectPaymentDetailsType");
|
|
21
|
+
class VpaCollectPaymentDetails extends CollectPaymentDetails_1.CollectPaymentDetails {
|
|
22
|
+
constructor(vpa) {
|
|
23
|
+
super(CollectPaymentDetailsType_1.CollectPaymentDetailsType.VPA);
|
|
24
|
+
this.vpa = vpa;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.VpaCollectPaymentDetails = VpaCollectPaymentDetails;
|
|
28
|
+
VpaCollectPaymentDetails.builder = () => {
|
|
29
|
+
return new VpaCollectPaymentDetailsBuilder();
|
|
30
|
+
};
|
|
31
|
+
class VpaCollectPaymentDetailsBuilder {
|
|
32
|
+
constructor() {
|
|
33
|
+
this.vpa = (vpa) => {
|
|
34
|
+
this._vpa = vpa;
|
|
35
|
+
return this;
|
|
36
|
+
};
|
|
37
|
+
this.build = () => {
|
|
38
|
+
return new VpaCollectPaymentDetails(this._vpa);
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export * from './BillingAddress';
|
|
2
|
+
export * from './CardPaymentV2Instrument';
|
|
3
|
+
export * from './CardPayRequestBuilder';
|
|
4
|
+
export * from './CollectPaymentDetails';
|
|
5
|
+
export * from './CollectPaymentDetailsType';
|
|
6
|
+
export * from './CollectPaymentV2Instrument';
|
|
7
|
+
export * from './Expiry';
|
|
8
|
+
export * from './IntentPaymentV2Instrument';
|
|
9
|
+
export * from './NetBankingPaymentV2Instrument';
|
|
10
|
+
export * from './NetBankingPayRequestBuilder';
|
|
11
|
+
export * from './NewCardDetails';
|
|
12
|
+
export * from './PaymentV2Instrument';
|
|
13
|
+
export * from './PhoneNumberCollectPaymentDetails';
|
|
14
|
+
export * from './TokenDetails';
|
|
15
|
+
export * from './TokenPaymentV2Instrument';
|
|
16
|
+
export * from './UpiCollectPayViaPhoneNumberRequestBuilder';
|
|
17
|
+
export * from './UpiCollectPayViaVpaRequestBuilder';
|
|
18
|
+
export * from './UpiIntentPayRequestBuilder';
|
|
19
|
+
export * from './UpiQrPaymentV2Instrument';
|
|
20
|
+
export * from './UpiQrRequestBuilder';
|
|
21
|
+
export * from './VpaCollectPaymentDetails';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2025 Original Author(s), PhonePe India Pvt. Ltd.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
29
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
30
|
+
};
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
__exportStar(require("./BillingAddress"), exports);
|
|
33
|
+
__exportStar(require("./CardPaymentV2Instrument"), exports);
|
|
34
|
+
__exportStar(require("./CardPayRequestBuilder"), exports);
|
|
35
|
+
__exportStar(require("./CollectPaymentDetails"), exports);
|
|
36
|
+
__exportStar(require("./CollectPaymentDetailsType"), exports);
|
|
37
|
+
__exportStar(require("./CollectPaymentV2Instrument"), exports);
|
|
38
|
+
__exportStar(require("./Expiry"), exports);
|
|
39
|
+
__exportStar(require("./IntentPaymentV2Instrument"), exports);
|
|
40
|
+
__exportStar(require("./NetBankingPaymentV2Instrument"), exports);
|
|
41
|
+
__exportStar(require("./NetBankingPayRequestBuilder"), exports);
|
|
42
|
+
__exportStar(require("./NewCardDetails"), exports);
|
|
43
|
+
__exportStar(require("./PaymentV2Instrument"), exports);
|
|
44
|
+
__exportStar(require("./PhoneNumberCollectPaymentDetails"), exports);
|
|
45
|
+
__exportStar(require("./TokenDetails"), exports);
|
|
46
|
+
__exportStar(require("./TokenPaymentV2Instrument"), exports);
|
|
47
|
+
__exportStar(require("./UpiCollectPayViaPhoneNumberRequestBuilder"), exports);
|
|
48
|
+
__exportStar(require("./UpiCollectPayViaVpaRequestBuilder"), exports);
|
|
49
|
+
__exportStar(require("./UpiIntentPayRequestBuilder"), exports);
|
|
50
|
+
__exportStar(require("./UpiQrPaymentV2Instrument"), exports);
|
|
51
|
+
__exportStar(require("./UpiQrRequestBuilder"), exports);
|
|
52
|
+
__exportStar(require("./VpaCollectPaymentDetails"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { MetaInfo } from '../MetaInfo';
|
|
2
|
+
import { PaymentDetail } from './PaymentDetail';
|
|
3
|
+
export declare class CallbackData {
|
|
4
|
+
state: string;
|
|
5
|
+
amount: number;
|
|
6
|
+
expireAt: number;
|
|
7
|
+
orderId: string;
|
|
8
|
+
merchantId: string;
|
|
9
|
+
merchantRefundId?: string;
|
|
10
|
+
originalMerchantOrderId?: string;
|
|
11
|
+
refundId?: string;
|
|
12
|
+
merchantOrderId?: string;
|
|
13
|
+
errorCode?: string;
|
|
14
|
+
detailedErrorCode?: string;
|
|
15
|
+
metaInfo?: MetaInfo;
|
|
16
|
+
paymentDetails: PaymentDetail[];
|
|
17
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2025 Original Author(s), PhonePe India Pvt. Ltd.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.CallbackData = void 0;
|
|
19
|
+
class CallbackData {
|
|
20
|
+
}
|
|
21
|
+
exports.CallbackData = CallbackData;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2025 Original Author(s), PhonePe India Pvt. Ltd.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.CallbackResponse = void 0;
|
|
19
|
+
class CallbackResponse {
|
|
20
|
+
}
|
|
21
|
+
exports.CallbackResponse = CallbackResponse;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare enum CallbackType {
|
|
2
|
+
PG_ORDER_COMPLETED = 0,
|
|
3
|
+
PG_ORDER_FAILED = 1,
|
|
4
|
+
PG_TRANSACTION_ATTEMPT_FAILED = 2,
|
|
5
|
+
PG_REFUND_COMPLETED = 3,
|
|
6
|
+
PG_REFUND_FAILED = 4,
|
|
7
|
+
PG_REFUND_ACCEPTED = 5,
|
|
8
|
+
CHECKOUT_ORDER_COMPLETED = 6,
|
|
9
|
+
CHECKOUT_ORDER_FAILED = 7,
|
|
10
|
+
CHECKOUT_TRANSACTION_ATTEMPT_FAILED = 8
|
|
11
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2025 Original Author(s), PhonePe India Pvt. Ltd.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.CallbackType = void 0;
|
|
19
|
+
var CallbackType;
|
|
20
|
+
(function (CallbackType) {
|
|
21
|
+
CallbackType[CallbackType["PG_ORDER_COMPLETED"] = 0] = "PG_ORDER_COMPLETED";
|
|
22
|
+
CallbackType[CallbackType["PG_ORDER_FAILED"] = 1] = "PG_ORDER_FAILED";
|
|
23
|
+
CallbackType[CallbackType["PG_TRANSACTION_ATTEMPT_FAILED"] = 2] = "PG_TRANSACTION_ATTEMPT_FAILED";
|
|
24
|
+
CallbackType[CallbackType["PG_REFUND_COMPLETED"] = 3] = "PG_REFUND_COMPLETED";
|
|
25
|
+
CallbackType[CallbackType["PG_REFUND_FAILED"] = 4] = "PG_REFUND_FAILED";
|
|
26
|
+
CallbackType[CallbackType["PG_REFUND_ACCEPTED"] = 5] = "PG_REFUND_ACCEPTED";
|
|
27
|
+
CallbackType[CallbackType["CHECKOUT_ORDER_COMPLETED"] = 6] = "CHECKOUT_ORDER_COMPLETED";
|
|
28
|
+
CallbackType[CallbackType["CHECKOUT_ORDER_FAILED"] = 7] = "CHECKOUT_ORDER_FAILED";
|
|
29
|
+
CallbackType[CallbackType["CHECKOUT_TRANSACTION_ATTEMPT_FAILED"] = 8] = "CHECKOUT_TRANSACTION_ATTEMPT_FAILED";
|
|
30
|
+
})(CallbackType = exports.CallbackType || (exports.CallbackType = {}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AccountPaymentInstrumentV2 } from './paymentinstruments/AccountInstrumentV2';
|
|
2
|
+
import { CreditCardPaymentInstrumentV2 } from './paymentinstruments/CreditCardPaymentInstrumentV2';
|
|
3
|
+
import { DebitCardPaymentInstrumentV2 } from './paymentinstruments/DebitCardPaymentInstrumentV2';
|
|
4
|
+
import { EgvPaymentInstrumentV2 } from './paymentinstruments/EgvPaymentInstrumentV2';
|
|
5
|
+
import { NetbankingPaymentInstrumentV2 } from './paymentinstruments/NetbankingPaymentInstrumentV2';
|
|
6
|
+
import { WalletPaymentInstrumentV2 } from './paymentinstruments/WalletPaymentInstrumentV2';
|
|
7
|
+
import { PgPaymentRail } from './rails/PgPaymentRail';
|
|
8
|
+
import { PpiEgvPaymentRail } from './rails/PpiEgvPaymentRail';
|
|
9
|
+
import { PpiWalletPaymentRail } from './rails/PpiWalletPaymentRail';
|
|
10
|
+
import { UpiPaymentRail } from './rails/UpiPaymentRail';
|
|
11
|
+
export declare class InstrumentCombo {
|
|
12
|
+
instrument: AccountPaymentInstrumentV2 | CreditCardPaymentInstrumentV2 | DebitCardPaymentInstrumentV2 | EgvPaymentInstrumentV2 | NetbankingPaymentInstrumentV2 | WalletPaymentInstrumentV2;
|
|
13
|
+
rail: UpiPaymentRail | PgPaymentRail | PpiEgvPaymentRail | PpiWalletPaymentRail;
|
|
14
|
+
amount: number;
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2025 Original Author(s), PhonePe India Pvt. Ltd.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.InstrumentCombo = void 0;
|
|
19
|
+
class InstrumentCombo {
|
|
20
|
+
}
|
|
21
|
+
exports.InstrumentCombo = InstrumentCombo;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MetaInfo } from '../MetaInfo';
|
|
2
|
+
import { PaymentDetail } from './PaymentDetail';
|
|
3
|
+
export declare class OrderStatusResponse {
|
|
4
|
+
merchantOrderId?: string;
|
|
5
|
+
merchantId?: string;
|
|
6
|
+
orderId: string;
|
|
7
|
+
state: string;
|
|
8
|
+
amount: number;
|
|
9
|
+
payableAmount?: number;
|
|
10
|
+
feeAmount?: number;
|
|
11
|
+
expireAt: number;
|
|
12
|
+
errorCode?: string;
|
|
13
|
+
detailedErrorCode?: string;
|
|
14
|
+
metaInfo?: MetaInfo;
|
|
15
|
+
paymentDetails: PaymentDetail[];
|
|
16
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2025 Original Author(s), PhonePe India Pvt. Ltd.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.OrderStatusResponse = void 0;
|
|
19
|
+
class OrderStatusResponse {
|
|
20
|
+
}
|
|
21
|
+
exports.OrderStatusResponse = OrderStatusResponse;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PgV2InstrumentType } from '../PgV2InstrumentType';
|
|
2
|
+
import { InstrumentCombo } from './InstrumentCombo';
|
|
3
|
+
import { AccountPaymentInstrumentV2 } from './paymentinstruments/AccountInstrumentV2';
|
|
4
|
+
import { UpiPaymentRail } from './rails/UpiPaymentRail';
|
|
5
|
+
import { CreditCardPaymentInstrumentV2 } from './paymentinstruments/CreditCardPaymentInstrumentV2';
|
|
6
|
+
import { PgPaymentRail } from './rails/PgPaymentRail';
|
|
7
|
+
import { DebitCardPaymentInstrumentV2 } from './paymentinstruments/DebitCardPaymentInstrumentV2';
|
|
8
|
+
import { EgvPaymentInstrumentV2 } from './paymentinstruments/EgvPaymentInstrumentV2';
|
|
9
|
+
import { NetbankingPaymentInstrumentV2 } from './paymentinstruments/NetbankingPaymentInstrumentV2';
|
|
10
|
+
import { WalletPaymentInstrumentV2 } from './paymentinstruments/WalletPaymentInstrumentV2';
|
|
11
|
+
import { PpiEgvPaymentRail } from './rails/PpiEgvPaymentRail';
|
|
12
|
+
import { PpiWalletPaymentRail } from './rails/PpiWalletPaymentRail';
|
|
13
|
+
export declare class PaymentDetail {
|
|
14
|
+
transactionId: string;
|
|
15
|
+
paymentMode: PgV2InstrumentType;
|
|
16
|
+
timestamp: number;
|
|
17
|
+
amount: number;
|
|
18
|
+
state: string;
|
|
19
|
+
errorCode?: string;
|
|
20
|
+
detailedErrorCode?: string;
|
|
21
|
+
instrument?: AccountPaymentInstrumentV2 | CreditCardPaymentInstrumentV2 | DebitCardPaymentInstrumentV2 | EgvPaymentInstrumentV2 | NetbankingPaymentInstrumentV2 | WalletPaymentInstrumentV2;
|
|
22
|
+
rail?: UpiPaymentRail | PgPaymentRail | PpiEgvPaymentRail | PpiWalletPaymentRail;
|
|
23
|
+
splitInstruments?: InstrumentCombo[];
|
|
24
|
+
}
|