Заметки к выпуску
Added
- Saved PayPal accounts (
IStoredCredentialPlugin, capabilitystoredCredentials) on the Vault v3 API.EnsureCustomerAsyncderives a stable vault customer id from the host's client reference (no PayPal call).BeginSaveMethodAsyncopens a setup token and sends the payer to PayPal's page;CompleteSaveMethodAsyncexchanges the approved setup token for a payment token, once per session.ChargeAsynccreates aCAPTUREorder withpayment_source.paypal.vault_id, keyed by the host's idempotency key, after PayPal confirms the account belongs to the customer; a refusal (HTTP 422) is a declined outcome, a charge PayPal asks the payer to confirm isActionRequired.FindChargeAsyncfinds the order the plugin remembered for a key and captures it when the payer approved meanwhile.ListMethodsAsync,SetDefaultMethodAsyncandRemoveMethodAsynclist, mark and delete saved accounts, always checking they belong to the customer. PaymentInstruction.SavePaymentMethod: the order asks PayPal to save the account when the payment succeeds (attributes.vault.store_in_vault = ON_SUCCESS) under the customer the host passes, and a stored account is reported inGatewayPaymentStatus.SavedMethodonly once PayPal says it isVAULTED.GatewayPaymentState.Reversed: a fully refunded capture with a resolved dispute decided for the payer (RESOLVED_BUYER_FAVOURon that very capture, read from/v1/customer/disputes) is reported as reversed. When the disputes cannot be read the payment stays pending.- The webhook asks the host to read the order of a resolved dispute, found from the disputed capture, so a charge-back reaches the host without waiting for its schedule.
IPaymentRefundStatePlugin: a refund PayPal accepts asPENDINGis reported as pending and followed throughGET /v2/payments/refunds/{id}until completed or failed.PaymentFailureReasonon a declined capture (Declined,ProcessingError) and on an instrument declined at capture.
Changed
- Built on
Hostpanel.Sdk3.19.0 (sdkPackageVersion3.19.0);minHostVersionis now 0.12.0. The gateway takes the host'sIPluginStorein its constructor.
Not done
- Settlement reconciliation through
/v1/reporting/transactions: the SDK has no reconciliation contract to feed, and the report lags by hours. intent=AUTHORIZEholds: the SDK has no authorize and capture-later contract. The Subscriptions and Invoicing APIs would duplicate the host's invoicing.- Embedded card fields and the
Redirectreply: the SDK 3.19.0 stored credential contract offers only the redirect session mode used here.
Установка этой версии
- 1
Откройте список плагинов в админке Hostpanel.
- 2
Установите плагин с идентификатором «paypal» и выберите версию 1.4.0.
- 3
Hostpanel скачивает этот подписанный пакет из реестра и проверяет подпись и версию SDK перед загрузкой.