By Mohammad Dourou on Thursday, 14 December 2017
Posted in General Issues
Likes 0
Views 719
Votes 0
Hello,

I have created extra fields for user to fill when they checkout, using User Detail App, and now I want to access those fields values in code here in this file /public_html/dev/components/com_payplans/controllers/payment.php in function complete()

So for example if user fill those extra fields, i want to access those added values in above stated function and file (to use with my API calls to my accounting system). Please let me know how I can do that?

Thanks
Mohammad
Hello,

Refer below mentioned solution to use the user parameters.
In function complete , find the below mentioned line of code (near line no. 194)

$invoice = $payment->getInvoice(PAYPLANS_INSTANCE_REQUIRE);


Use the below mentioned code the user details fields.

$userId = $invoice->getBuyer();
$user = PayplansUser::getInstance($userId);
$params = $user->getParams()->toArray();


In $params, you will get array of values, try this and update me if you have any confusion.
·
Friday, 15 December 2017 11:08
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you Manisha, it worked.
·
Friday, 15 December 2017 13:22
·
0 Likes
·
0 Votes
·
0 Comments
·
Your welcome
·
Friday, 15 December 2017 13:57
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post