I am at the final stages of the checkout and I am having a problem at the AuthorizePayment part. The error states:
System.ArgumentOutOfRangeException: StartIndex cannot be less than zero.
This error occurs at this line:
var attempt = preparation.AuthorizePayment(paymentGatewayMethod.PaymentMethod.Key);
Here is a snippet of the code:
var paymentGatewayMethod = MerchelloContext.Current.Gateways.Payment.GetPaymentGatewayMethods().FirstOrDefault();
if (paymentGatewayMethod != null)
{
//Save
preparation.SavePaymentMethod(paymentGatewayMethod.PaymentMethod);
var attempt = preparation.AuthorizePayment(paymentGatewayMethod.PaymentMethod.Key); //CUTS OUT HERE
if (attempt.Payment.Success)
{
}
else
{
}
}
}
When I debug the code, it is definitely getting the Stripe Payment Provider that I am retrieving.
I cannot find any similar error online. Any idea how this could happen? I obviously know what the out of bounds error is but I'm just wondering how it can happen on that line. It doesn't look like there's an array present.
Also what exactly does AuthorizePayment do? What is AuthorizeCapturePayment?
AuthorizePayment not working for Stripe Payment Provider
Hey Rusty,
I am at the final stages of the checkout and I am having a problem at the AuthorizePayment part. The error states:
System.ArgumentOutOfRangeException: StartIndex cannot be less than zero.
This error occurs at this line:
Here is a snippet of the code:
When I debug the code, it is definitely getting the Stripe Payment Provider that I am retrieving.
I cannot find any similar error online. Any idea how this could happen? I obviously know what the out of bounds error is but I'm just wondering how it can happen on that line. It doesn't look like there's an array present.
Also what exactly does AuthorizePayment do? What is AuthorizeCapturePayment?
Any help at all would be great!!
Thanks in advance!
Hey Paul,
I did not write the Stripe provider. That was originally done by a New York agency named FlightPath.
I think this is Alex's repository https://github.com/alindgren/MerchelloStripeProvider
It may be that it just needs to have it's dependencies updated with current version of Umbraco and Merchello - both of which can be done via NuGet.
If not, at least you'd be able to step through it =)
Wow, thanks for the super quick response! Ok, i'll try that! Thanks again Rusty!
Hi Paul
What version of Merchello was this? I'm trying to use the Stripe provider with v 2.1 of Merchello but its no longer working
Thanks
Ben
is working on a reply...