PayMongoSDK class
🚧 DO NOT USE SECRET KEY IN PRODUCTION
Following methods will use secret key
- createPayment Initialize PayMongo SDK.
The code provided is an example of using a secret key
final publicKeyClient = PayMongoSDK(publicKey);
final secretKeyClient = PayMongoSDK(secretKey);
- Available extensions
Constructors
- PayMongoSDK.new(String secret, {BaseClient? httpClient, String apiUrl = 'api.paymongo.com'})
- Following methods will use secret key
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- httpClient → BaseClient?
-
custom http. be sure you include your api key to have basic base64
authorization headers.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secret → String
-
key generated from paymongo dashboard
you can use
--dart-define
command to store your private key.final
Methods
-
attachToPaymentIntent(
String id, PaymentIntentAttach data) → Future< PaymentIntentAttachResponse> -
Available on PayMongoSDK, provided by the PayMongoPaymentIntent extension
Attach payment intent to receive payment status. -
createPayment(
CreatePaymentAttributes data, [int? before, int? after, int? limit]) → Future< CreatePaymentResponse> -
Available on PayMongoSDK, provided by the PayMongoPayments extension
Creates a payment from other types of sources in PayMongo. -
createPaymentIntent(
PaymentIntentAttributes attributes) → Future< PaymentIntentResponse> -
Available on PayMongoSDK, provided by the PayMongoPaymentIntent extension
Create payment and call attachToPaymentIntent to your backend using secret key -
createPaymentMethod(
{required PaymentMethodAttributes data}) → Future< PaymentMethodResponse> -
Available on PayMongoSDK, provided by the PayMongoPaymentMethod extension
-
createSource(
SourceAttributes source) → Future< SourceResult> -
Available on PayMongoSDK, provided by the PayMongoSource extension
A Source resource is used to generate GCash/GrabPay checkout URL to authorize a certain amount to be deducted from your customer's GCash account and send it to your PayMongo account. After completing the authorization, your integration uses the chargeable source to make a create payment request and receive the payment. -
get<
T> (PayMongoOptions options) → Future< T> - make GET response
-
listPayments(
) → Future< List< CreatePaymentResponse> > -
Available on PayMongoSDK, provided by the PayMongoPayments extension
Get all payments -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onPaymentListener(
{required String paymentMethod, required PaymentIntentResponse intent}) → Future< PaymentResult?> -
Available on PayMongoSDK, provided by the PayMongoPaymentMethod extension
-
post<
T> (PayMongoOptions options) → Future< T> - make POST response.
-
retreivePayment(
int id) → Future< CreatePaymentResponse> -
Available on PayMongoSDK, provided by the PayMongoPayments extension
Retreive payment by ID -
retreivePaymentIntent(
int id) → Future< String?> -
Available on PayMongoSDK, provided by the PayMongoPaymentIntent extension
-
retreivePaymentMethod(
int id) → Future< String> -
Available on PayMongoSDK, provided by the PayMongoPaymentMethod extension
-
retreiveSource(
int id) → Future< SourceResult> -
Available on PayMongoSDK, provided by the PayMongoSource extension
Retrieves the payment -
retrievePaymentIntentClient(
{required String paymentIntentId, required String clientKey}) → Future< PaymentIntentResponse> -
Available on PayMongoSDK, provided by the PayMongoPaymentIntent extension
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited