### [wpforms_paypal_standard_process_complete](https://wpforms.com/developers/wpforms_paypal_standard_process_complete/)

**Published:** September 21, 2021
**Author:** Editorial Team

**Excerpt:** The action fires when PayPal payment is processed on the form submission for WPForms.

**Content:**

## Description

The `wpforms_paypal_standard_process_complete` action fires when PayPal returns the status of the payment processed from the form.

## Parameters

$fields*(array)* Sanitized entry field values/properties.$form\_data*(array)* Processed form settings/data, prepared to be used later.$payment\_id*(int)* PayPal Payment ID.$data*(array)* PayPal Web Accept Data.## Source

`wpforms-paypal-standard/class-paypal-standard.php`

## More Information

The action will process when PayPal notifies the site of the payment status.

## Examples

```

/**
 * Fires when PayPal payment status notifies the site.
 *
 * @link  https://wpforms.com/developers/wpforms_paypal_standard_process_complete/
 *
 * @param array  $fields     Sanitized entry field values/properties.
 * @param array  $form_data  Form data and settings.
 * @param int    $payment_id PayPal Payment ID.
 * @param array  $data       PayPal Web Accept Data.
*/

function wpf_paypal_standard_process_complete( $fields, $form_data, $payment_id, $data ) {

	if ( empty( $data[ 'payment_status' ] ) || strtolower( $data[ 'payment_status' ] ) !== 'completed' ) {
		return;
	}

	// Run code...

}
add_action( 'wpforms_paypal_standard_process_complete', 'wpf_paypal_standard_process_complete', 10, 4 );
```

## Related

Tutorial Reference: [How to Approve a User After a PayPal Payment](https://wpforms.com/developers/how-to-approve-a-user-after-a-paypal-payment/ "How to Approve a User After a PayPal Payment")

**Categories:** Actions Hooks

**Tags:** PayPal, PHP

---

