improved logging in callbacks
This commit is contained in:
@@ -158,16 +158,13 @@ void main() {
|
||||
final request = InitiatePaymentRequest(
|
||||
idempotencyKey: 'idem-2',
|
||||
quoteRef: 'q-1',
|
||||
metadata: const {'client_payment_ref': 'cp-1'},
|
||||
clientPaymentRef: 'cp-1',
|
||||
);
|
||||
|
||||
final json = request.toJson();
|
||||
expect(json['idempotencyKey'], equals('idem-2'));
|
||||
expect(json['quoteRef'], equals('q-1'));
|
||||
expect(
|
||||
(json['metadata'] as Map<String, dynamic>)['client_payment_ref'],
|
||||
equals('cp-1'),
|
||||
);
|
||||
expect(json['clientPaymentRef'], equals('cp-1'));
|
||||
expect(json.containsKey('intent'), isTrue);
|
||||
expect(json['intent'], isNull);
|
||||
});
|
||||
@@ -176,16 +173,13 @@ void main() {
|
||||
final request = InitiatePaymentsRequest(
|
||||
idempotencyKey: 'idem-3',
|
||||
quoteRef: 'q-2',
|
||||
metadata: const {'client_payment_ref': 'cp-1'},
|
||||
clientPaymentRef: 'cp-1',
|
||||
);
|
||||
|
||||
final json = request.toJson();
|
||||
expect(json['idempotencyKey'], equals('idem-3'));
|
||||
expect(json['quoteRef'], equals('q-2'));
|
||||
expect(
|
||||
(json['metadata'] as Map<String, dynamic>)['client_payment_ref'],
|
||||
equals('cp-1'),
|
||||
);
|
||||
expect(json['clientPaymentRef'], equals('cp-1'));
|
||||
expect(json.containsKey('intentRef'), isFalse);
|
||||
expect(json.containsKey('intentRefs'), isFalse);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user