toMap method

Map<String, dynamic> toMap()

Links your paymaya without re-logging in again.

final createWalletObject = CreateWalletObject(
  requestReferenceNumber: '65559',
  success:'https://yoururl.com/succes?id=65593',
  cancel: 'https://yoururl.com/cancel?id=65593',
  failure: 'https://yoururl.com/failure?id=65593',
  metadata: {
      ///...
  }
);

Creates a wallet link that allows charging to a PayMaya account. The redirect URLs are used to go back to merchant’s server after the link has been processed depending on the status, as shown in the request body. The metadata is used to add payment facilitator information, as indicated in this section.

Implementation

Map<String, dynamic> toMap() {
  return {
    'requestReferenceNumber': requestReferenceNumber,
    'metadata': metadata,
    'success': success,
    'cancel': cancel,
    'failure': failure,
  };
}