Skip to content

Commit

Permalink
add change log
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahad Ashraf committed Jul 26, 2022
1 parent bdeafbf commit cf8e9c7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Changelog
All notable changes to this project will be documented in this file.

## [1.0.5]

- Add support for new 'Agreements Engine' parameters
- Add support for Apple Pay

## [1.0.4]

- Update format of the User-Agent header
Expand Down
14 changes: 7 additions & 7 deletions tests/integration/SubscriptionTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var SubscriptionTests = {

var request = factory.getReservationRequest();

request.amount = 7;
request.amount = 10;
request.terminal = 'AltaPay Test Terminal';
request.currency = 'EUR';
request.cardnum = '4111111111111111';
Expand All @@ -37,31 +37,31 @@ var SubscriptionTests = {
{
var request = factory.getChargeRequest();
request.subscriptionPaymentId = authResponse.getPaymentId();
request.amount = 3;
request.amount = 8;
request.reconciliationIdentifier = 'my reconciliation identifier';

var response = mapi.chargeSubscription(request);

Assert.equals(true, response.success(), "Error: "+response.getErrorMessage());
Assert.equals(7, response.getSubscriptionPayment().getRecurringDefaultAmount());
Assert.equals(10, response.getSubscriptionPayment().getRecurringDefaultAmount());
Assert.equals(authResponse.getPaymentId(), response.getSubscriptionPayment().getPaymentId());
Assert.equals(3, response.getChargePayment().getCapturedAmount());
Assert.equals(8, response.getChargePayment().getCapturedAmount());
Assert.equals('my reconciliation identifier', response.getChargePayment().getReconciliationIdentifier());
},

reserveSubscriptionChargeAndCaptureReservation : function()
{
var request = factory.getChargeRequest();
request.subscriptionPaymentId = authResponse.getPaymentId();
request.amount = 3;
request.amount = 8;
request.agreementUnscheduledType = AgreementUnscheduledType.incremental;

var response = mapi.reserveSubscriptionCharge(request);

Assert.equals(true, response.success(), "Error: "+response.getErrorMessage());
Assert.equals(7, response.getSubscriptionPayment().getRecurringDefaultAmount());
Assert.equals(10, response.getSubscriptionPayment().getRecurringDefaultAmount());
Assert.equals(authResponse.getPaymentId(), response.getSubscriptionPayment().getPaymentId());
Assert.equals(3, response.getChargePayment().getReservedAmount());
Assert.equals(8, response.getChargePayment().getReservedAmount());
Assert.equals(0, response.getChargePayment().getCapturedAmount());

request = factory.getCaptureRequest();
Expand Down

0 comments on commit cf8e9c7

Please sign in to comment.