Paypal IPN Process More Than One Custom Field |
X

Congrats, You are Subscribed to Receive Updates.

Paypal IPN Process More Than One Custom Field


Paypal IPN Process More Than One Custom Field. While processing with PayPal IPN, we may have to use custom variables and fields to pass on to the cart and receive it together on the IPN to validate it.  But in PayPal , they allow use to pass our custom things on the custom field. so if we need to pass more than one variable, how we do that. Lets try a trick to pass more attributes on the same one.

PayPal-logo-20071

Just provide all your custom parameters in one custom field as like the following one.

<input type="hidden" name="custom" value="var1=summa&var2=143&jo=thi&etc.."/>

Likewise put all your variables in one field with & just like the GET Method.

Than the IPN will be returned to your specified URL, Now, you need to parse the string before start working with it. Just use the following function to parse it.

function kv_parse_ipn_custom_variable($POST['custom']) {

	parse_str($_POST['custom'],$_KVCODES);
	return $_KVCODES; 
}

kv_parse_ipn_custom_variable($_POST['custom'] );

The above function will parse it and return you, now you can use it like the following one .

echo $_KVCODES['var1']; 

echo $_KVCODES['var2'];

So, this way you can  work on multiple fields with it.

commenter

About Varadharaj V

The founder of Kvcodes, Varadharaj V is an ERP Analyst and a Web developer specializing in WordPress(WP), WP Theme development, WP Plugin development, Frontaccounting(FA), Sales, Purchases, Inventory, Ledgers, Payroll & HRM, CRM, FA Core Customization, PHP and Data Analyst. Database Management Advance Level

Comment Below

Your email address will not be published. Required fields are marked *

*

Current ye@r *

Menu

Sidebar