fn_verify_saferpay_payment

Verify Saferpay payment.

Description

(string) fn_verify_saferpay_payment( $gateway, $input ); 

Returns (string)

- returns the content of the response from Saferpay

Parameters (2)

0. $gateway
The gateway.
1. $input
The input.

Usage

  1. if ( !function_exists( 'fn_verify_saferpay_payment' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-payment-gateway-for-saferpay/fn-saferpay.php'; 
  3.  
  4. // The gateway. 
  5. $gateway = null; 
  6.  
  7. // The input. 
  8. $input = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = fn_verify_saferpay_payment($gateway, $input); 
  12.  

Defined (1)

The function is defined in the following location(s).

/fn-saferpay.php  
  1. function fn_verify_saferpay_payment($gateway, $input) 
  2.  
  3. $variables = array ( 
  4.  
  5. 'ACCOUNTID' => $gateway->get_option('accountid'),  
  6. 'SIGNATURE' => $input['SIGNATURE'],  
  7. 'DATA' => urlencode($input['DATA']) 
  8. );  
  9.  
  10.  
  11. // Build the URL for the verification process 
  12. $url = add_query_arg($variables, FN_SAFERPAY_VERIFYPAYCONFIRM); 
  13.  
  14. // Return the content of the response 
  15. return fn_get_urlcontent($url); 
  16.