Skip to content

Commit

Permalink
chippin added
Browse files Browse the repository at this point in the history
  • Loading branch information
beratallahverdi committed Sep 30, 2024
1 parent cb5805d commit de35218
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions Samples/PaymentSample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1141,6 +1141,45 @@ public void Init_Tompay_Apm_Payment()
Assert.AreEqual(response.AdditionalAction, ApmAdditionalAction.WAIT_FOR_WEBHOOK);
}

[Test]
public void Init_Chippin_Apm_Payment()
{
var request = new InitApmPaymentRequest
{
ApmType = ApmType.CHIPPIN,
ApmUserIdentity = 1000000, // Chippin Kullanıcı No
Price = new decimal(1.0),
PaidPrice = new decimal(1.0),
Currency = Currency.TRY,
PaymentGroup = PaymentGroup.LISTING_OR_SUBSCRIPTION,
ConversationId = "conversationId",
ExternalId = "externalId",
CallbackUrl = "https://www.your-website.com/craftgate-apm-callback",
Items = new List<PaymentItem>
{
new PaymentItem
{
Name = "Item 1",
ExternalId = Guid.NewGuid().ToString(),
Price = new decimal(0.40)
},

new PaymentItem
{
Name = "Item 2",
ExternalId = Guid.NewGuid().ToString(),
Price = new decimal(0.60)
}
},
};

var response = _craftgateClient.Payment().InitApmPayment(request);
Assert.NotNull(response);
Assert.NotNull(response.PaymentId);
Assert.AreEqual(response.PaymentStatus, PaymentStatus.WAITING);
Assert.AreEqual(response.AdditionalAction, ApmAdditionalAction.WAIT_FOR_WEBHOOK);
}

[Test]
public void Complete_Edenred_Apm_Payment()
{
Expand Down

0 comments on commit de35218

Please sign in to comment.