Skip to content

Commit

Permalink
Update Stripe.net 43.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hishamco committed Jan 5, 2024
1 parent 20a2a2f commit 7b6004a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ public async Task<IActionResult> Charge(string stripeEmail, string stripeToken)
{
var stripeProvider = await _paymentProviderRepository.Query().FirstOrDefaultAsync(x => x.Id == PaymentProviderHelper.StripeProviderId);
var stripeSetting = JsonConvert.DeserializeObject<StripeConfigForm>(stripeProvider.AdditionalSettings);
var stripeChargeService = new ChargeService(stripeSetting.PrivateKey);

StripeConfiguration.ApiKey = stripeSetting.PrivateKey;

var stripeChargeService = new ChargeService();
var currentUser = await _workContext.GetCurrentUser();
//TODO: pass checkout Id here
var cart = await _checkoutService.GetCheckoutDetails(Guid.Empty);
Expand Down Expand Up @@ -89,7 +92,7 @@ public async Task<IActionResult> Charge(string stripeEmail, string stripeToken)
Amount = (int)zeroDecimalOrderAmount,
Description = "Sample Charge",
Currency = regionInfo.ISOCurrencySymbol,
SourceId = stripeToken
Source = stripeToken
});

payment.GatewayTransactionId = charge.Id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<ProjectReference Include="..\SimplCommerce.Module.Core\SimplCommerce.Module.Core.csproj" />
<ProjectReference Include="..\SimplCommerce.Module.Orders\SimplCommerce.Module.Orders.csproj" />
<ProjectReference Include="..\SimplCommerce.Module.Payments\SimplCommerce.Module.Payments.csproj" />
<PackageReference Include="Stripe.net" Version="22.8.0" />
<PackageReference Include="Stripe.net" Version="43.9.0" />
</ItemGroup>

</Project>

0 comments on commit 7b6004a

Please sign in to comment.