Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscription için checkout form sonucunun çekilmesi sağlandı #112

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
558 changes: 324 additions & 234 deletions Iyzipay.Tests/Functional/SubscriptionTest.cs

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion Iyzipay/Iyzipay.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
<TargetFrameworks>net45;netstandard2.0;netstandard1.3</TargetFrameworks>
<AssemblyName>Iyzipay</AssemblyName>
<RootNamespace>Iyzipay</RootNamespace>
<Version>2.1.39</Version>
<Version>2.1.40</Version>
<Authors>Iyzico</Authors>
<Description>iyzipay api .net client</Description>
<PackageProjectUrl>https://github.com/iyzico/iyzipay-dotnet&lt;/projectUrl</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/iyzico/iyzipay-dotnet/blob/master/LICENSE</PackageLicenseUrl>
<RepositoryUrl>https://github.com/iyzico/iyzipay-dotnet</RepositoryUrl>
<PackageIconUrl>https://en.gravatar.com/userimage/100711999/40aab086bed8dabfb387c0772a73ea7e.png</PackageIconUrl>
<Copyright>Copyright 2016</Copyright>
<PackageVersion>2.1.40</PackageVersion>
</PropertyGroup>


Expand Down
2 changes: 1 addition & 1 deletion Iyzipay/Model/CheckoutForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Iyzipay.Model
public class CheckoutForm : PaymentResource
{
public String Token { get; set; }
public String CallbackUrl { get; set; }
public String CallbackUrl { get; set; }

public static CheckoutForm Retrieve(RetrieveCheckoutFormRequest request, Options options)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Iyzipay.Model.V2.Subscription
{
public class SubscribeCheckoutFormResource : SubscriptionCreatedResource
{
public long? CanceledAt { get; set; }
public long? EndDate { get; set; }
}
}
6 changes: 6 additions & 0 deletions Iyzipay/Model/V2/Subscription/Subscription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ public static CheckoutFormResource InitializeCheckoutForm(InitializeCheckoutForm
return RestHttpClientV2.Create().Post<CheckoutFormResource>( uri, GetHttpHeadersWithRequestBody(request, uri ,options), request);
}

public static SubscribeCheckoutFormResource RetrieveCheckoutFormResult(RetrieveCheckoutFormResultRequest request, Options options)
{
string uri = $"{options.BaseUrl}/v2/subscription/checkoutform/{request.Token}";
return RestHttpClientV2.Create().Get<SubscribeCheckoutFormResource>(uri, GetHttpHeadersWithUrlParams(request, uri ,options));
}

public static UpdateCardFormResource UpdateCard(UpdateCardRequest request, Options options)
{
string uri = $"{options.BaseUrl}/v2/subscription/card-update/checkoutform/initialize";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Iyzipay.Model.V2.Subscription
{
public class SubscriptionCreatedResource
public class SubscriptionCreatedResource: IyzipayResourceV2
{
public string ReferenceCode { get; set; }
public string ParentReferenceCode { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using System;

namespace Iyzipay.Request.V2.Subscription
{
public class RetrieveCheckoutFormResultRequest : BaseRequestV2
{
public String Token { get; set; }
}
}
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.39
2.1.40