Update deprecated event name

This commit is contained in:
Alex P 2023-10-19 15:55:57 +03:00
parent 5d406ea612
commit bb92792420
No known key found for this signature in database
GPG key ID: 54487A734A204D71

View file

@ -19,7 +19,7 @@ const PayPalComponent = ({
shippingData,
isEditing,
}) => {
const {onPaymentSetup, onCheckoutAfterProcessingWithError, onCheckoutValidation} = eventRegistration;
const {onPaymentSetup, onCheckoutFail, onCheckoutValidation} = eventRegistration;
const {responseTypes} = emitResponse;
const [paypalOrder, setPaypalOrder] = useState(null);
@ -253,7 +253,7 @@ const PayPalComponent = ({
}, [onPaymentSetup, paypalOrder, activePaymentMethod]);
useEffect(() => {
const unsubscribe = onCheckoutAfterProcessingWithError(({ processingResponse }) => {
const unsubscribe = onCheckoutFail(({ processingResponse }) => {
if (onClose) {
onClose();
}
@ -267,7 +267,7 @@ const PayPalComponent = ({
return true;
});
return unsubscribe;
}, [onCheckoutAfterProcessingWithError, onClose]);
}, [onCheckoutFail, onClose]);
if (config.scriptData.continuation) {
return (