public/wordpress/wp-content/plugins/wp-courseware/includes/gateways/gateway-paypal.php
/**
	 * IPN: Validate Amount.
	 *
	 * Check payment amount from IPN matches the order.
	 *
	 * @param Order $order The order object.
	 * @param int   $amount The amount to compare with the order.
	 */
Validate Amount.
Check payment amount from IPN matches the order.

@param Order $order The order object.
@param int   $amount The amount to compare with the order.
Validate Amount . Check payment amount from IPN matches the order . @param Order $order The order object . @param int $amount The amount to compare with the order .
protected function ipn_validate_amount( $order, $amount ) {
		if ( number_format( $order->get_total(), 2, '.', '' ) !== number_format( $amount, 2, '.', '' ) ) {
			$this->log( sprintf( __( 'IPN Payment error: Amounts do not match (total %1$s) (gross %2$s).', 'wp-courseware' ), $order->get_total(), $amount ) );
			$this->payment_on_hold( $order, sprintf( __( 'Validation error: PayPal amounts do not match (total %1$s) (gross %2$s).', 'wp-courseware' ), $order->get_total(), $amount ) );
			exit;
		}
	}
protected function ipn_validate_amount ( $ order , $ amount ) { if ( number_format ( $ order -> get_total ( ) , 2 , '.' , '' ) !== number_format ( $ amount , 2 , '.' , '' ) ) { $ this -> log ( sprintf ( __ ( 'IPN Payment error: Amounts do not match (total %1$s) (gross %2$s).' , 'wp-courseware' ) , $ order -> get_total ( ) , $ amount ) ) ; $ this -> payment_on_hold ( $ order , sprintf ( __ ( 'Validation error: PayPal amounts do not match (total %1$s) (gross %2$s).' , 'wp-courseware' ) , $ order -> get_total ( ) , $ amount ) ) ; exit ; } }
IPN: Validate Amount.
IPN : Validate Amount .
/* translators: %1$s: Total, %2$s: Amount. */