Release notes
Changed
- Built against
Hostpanel.Sdk3.7.0 (it was 3.1.0). The stored credential contract is unchanged in 3.5.0, 3.6.0 and 3.7.0, so the plugin loads on the same hosts as before. - The transport sends and reads through the SDK's
PluginHttp: the bounded read of an answer, the deadline and the check of the host an answer came from are no longer written by hand here. A refused or dropped connection, a timeout, an answer that is too large and an answer from another host are still raised as aStripeApiExceptionof the same kinds. The sending and the reading of the body each have thirty seconds, where one thirty second deadline once covered both. A redirect answer is never followed and is reported as a refusal; the plugin tests now run the SDK's redirect contract. - The lookup of a charge by the host's key (
FindChargeAsync, and the lookupChargeAsyncmakes before it charges) no longer reads up to 2000 intents and then gives up for good. It reads the customer's newest 100 PaymentIntents from the list, which Stripe answers at once, and when the customer has older intents it makes one search on the customer and the key, so a customer with a very long history can be retried and the lookup is at most two calls. Not found is answered only when the list reached its end or the search found no intent with the key. The lookup still raises aStripeApiException(kindLookupIncomplete) when the customer has older intents and the key contains a quote or a backslash, or the search holds more matches than it returned. Stripe's search lags behind writes (under a minute normally, up to an hour in an outage) and is not available to businesses in India; the README lists this and the assumption the plugin makes about it.
Added
- A payment that asks to save the method (
SavePaymentMethod) and carries the Stripe customer the host got fromEnsureCustomerAsync(CustomerRef) is opened for that customer, with the card kept for later off session use. The saved card lands on the customer thatChargeAsynccharges. The customer is part of the idempotency key. A payment without the request, or with a reference that is not a Stripe customer id, stays a plain one-off payment. The setup mode flow (BeginSaveMethodAsync) is unchanged.
Fixed
- Error codes that Stripe documents as final refusals of a payment method were raised as unknown instead of being declined:
payment_method_provider_decline,payment_method_restricted,payment_method_customer_decline,expired_payment_method,authentication_failure,incorrect_addressandincorrect_postal_code, and the decline codeincorrect_address.payment_method_not_available, which Stripe documents as passing, is now pending.authentication_requiredandauthentication_not_handledsent as the decline code of a declined card now send the payer to Stripe's authentication page, like the same words sent as the error code. The tables were checked against Stripe's error code and decline code references, and the README lists the documented codes that stay raised on purpose.
Install this version
- 1
Open the plugin list in your Hostpanel admin.
- 2
Install the plugin with the id "stripe" and choose version 1.1.1.
- 3
Hostpanel downloads this signed package from the registry and checks the signature and the SDK version before it loads.