Paypal IPN simulator

StartPrev 1 2 NextEnd
10.10.2020 16:44
#21
KW
Joomshopping forum user no avatar
Name: Kian William
06.10.2020
Posts: 25
Quote
Aw: Paypal IPN simulator

ok thanks, also I found $_POST data in checkoutBuyModel in method saveToLogPayment, I can trigger a custom content plugin here and grab the stuff in $_POST there or Do you think I can assign $_POST to a session variable in this method?
Kian William


Last change: 10.10.2020 16:45
 
12.10.2020 07:54
#22
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25946
Quote
Aw: Paypal IPN simulator

content plugin - no
Save to Sassion - yes

 
12.10.2020 11:42
#23
KW
Joomshopping forum user no avatar
Name: Kian William
06.10.2020
Posts: 25
Quote
Aw: Paypal IPN simulator

Session variable so be it, I shall keep you informed
Kian William

 
12.10.2020 14:28
#24
KW
Joomshopping forum user no avatar
Name: Kian William
06.10.2020
Posts: 25
Quote
Aw: Paypal IPN simulator

I assigned post to a session variable in paymentData method of checkoutBuyModel and I printed the session variable in layout override of finish.php , the array is empty
Kian William


Last change: 12.10.2020 14:30
 
13.10.2020 09:07
#25
KW
Joomshopping forum user no avatar
Name: Kian William
06.10.2020
Posts: 25
Quote
Aw: Paypal IPN simulator

My logic is right, I used /JFactory::getSession(), but paypal returns no post data, both paymentdata.log and session variable are empty.
paymentdata.log just shows the url belong to step7 nothing else. The settings in paypal backend of jshopping is already set to paid, so the problem is with paypal side, I know I can have post data in layout override of finish.php.
If one day you update or upgrade jshopping, I only paste two lines of code there in saveToLogPaymentData method of checkoutBuyModel
in second. Now I have post data in layout override, I shall develop options for download data for the users.
Thanks for the support and if there are more things I have to know, respond here
Kian William


Last change: 13.10.2020 10:30
 
17.10.2020 12:00
#26
KW
Joomshopping forum user no avatar
Name: Kian William
06.10.2020
Posts: 25
Quote
Aw: Paypal IPN simulator

I have a new question yet in connection with my other questions:
In checkoutBuyModel , saveToLogPaymentData method ,
foreach($_POST as $key=>$value){...}
If a client buys several different items, isn't there repeated keys?
for example: client buys: 5 different softwares, in $_POST data, $_POST['last_name'] or $_POST['item_name'] have to be repeated 5 times(Because after purchase $_POST will have all different 5 items) unless
$value to be considered as an array itself, in that case it should be printed as a second nested loop. True or False?
$_POST[0]['item_name']
$_POST[1]['item_name'] and etc.
Kian William

 
17.10.2020 13:09
#27
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25946
Quote
Aw: Paypal IPN simulator

No

See
components\com_jshopping\payments\pm_paypal\pm_paypal.php

only one item_name
<input type='hidden' name='item_name' value='<?php print $item_name;?>'>

 
17.10.2020 17:11
#28
KW
Joomshopping forum user no avatar
Name: Kian William
06.10.2020
Posts: 25
Quote
Aw: Paypal IPN simulator

Great, this form is able to send data to paypal for one item but for 5 items, the method showEndForm is going to be called 5 times each time a new item with the same data of customer. true?
Kian William


Last change: 17.10.2020 17:16
 
17.10.2020 18:39
#29
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25946
Quote
Aw: Paypal IPN simulator

No.
one for order.

 
18.10.2020 09:54
#30
KW
Joomshopping forum user no avatar
Name: Kian William
06.10.2020
Posts: 25
Quote
Aw: Paypal IPN simulator

But I viewed no condition in the file to generate more input hidden field for order with multiple items unless, item_name becomes a comma separated list, or space separated list.
Kian William

 
19.10.2020 11:24
#31
KW
Joomshopping forum user no avatar
Name: Kian William
06.10.2020
Posts: 25
Quote
Aw: Paypal IPN simulator

Got it, I thought item_name must refer to the product name, it is the order number as value of item_name rather than product name, with the help of order number we are able to retrieve all data from the order table including product names.
Thanks for the support and letting me find out myself, new orders after buying from paypal in testing mode are not registered in order layout backend of jshopping (I think some stuff must be set in paypal account and maybe being in joomla 4 has created some problems with jshopping) or I would not ask this question at all. Thanks again and long live Science
Kian William


Last change: 19.10.2020 11:33
 
27.10.2020 07:40
#32
KW
Joomshopping forum user no avatar
Name: Kian William
06.10.2020
Posts: 25
Quote
Aw: Paypal IPN simulator

Greetings again
few questions ,
1- For Sofortueberweisung payment type user_variable_0 carries the order_id, after payment in Sofortueberweisung we have to have $_POST['user_variable_0'] true? and Is this just the id number or some text associates it like paypal e.g item_name=order number 12345?
2-In payment by debit, the client will not leave the site, true?
Kian William

 
27.10.2020 07:46
#33
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25946
Quote
Aw: Paypal IPN simulator

1.
components\com_jshopping\payments\pm_sofortueberweisung\pm_sofortueberweisung.php

function showEndForm($params, $order) {

'user_variable_0' => $order->order_id,

2. Yes


Last change: 27.10.2020 07:46
 
27.10.2020 09:48
#34
KW
Joomshopping forum user no avatar
Name: Kian William
06.10.2020
Posts: 25
Quote
Aw: Paypal IPN simulator

Yes I viewed the code already I just wanted to be sure. Thanks for the fast response
Kian William

 
04.11.2020 10:48
#35
KW
Joomshopping forum user no avatar
Name: Kian William
06.10.2020
Posts: 25
Quote
Aw: Paypal IPN simulator

Greetings
A question in regard with sofort payment type.
the variable $_POST['user_variable_0'] has the order id and user_variable_1 to 3 each has urls (return, cancel and notify), what are the usage for
user_variable_4 and 5?
Also in sofort payment type: user_variable_0 = $order->id; it is the value of order_id field of table #__jshopping_orders rather than order_number field of this table? because in paypal it is order_number in item_name and I have to join #__jshopping_orders with #__jshopping_order_item to extract data.
With sofort payment type I can directly go to #__jshopping_order_item to extract data, because I have order_id value, true?
Kian William


Last change: 04.11.2020 12:14
 
04.11.2020 14:32
#36
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25946
Quote
Aw: Paypal IPN simulator

return, cancel and notify

for return after paid

or cancel

notify - server nofify url (change staus payment)


Last change: 04.11.2020 14:33
 
05.11.2020 06:23
#37
KW
Joomshopping forum user no avatar
Name: Kian William
06.10.2020
Posts: 25
Quote
Aw: Paypal IPN simulator

Alright, you did not answer my second question so I consider it as I am right and it is order_id field's value and I can directly employ it at #__jshopping_order_item table when a customer use sofort option as payment type to collect data.
Thanks for the support
Kian William

 
05.11.2020 21:01
#38
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25946
Quote
Aw: Paypal IPN simulator

Yes.

 
10.11.2020 08:35
#39
KW
Joomshopping forum user no avatar
Name: Kian William
06.10.2020
Posts: 25
Quote
Aw: Paypal IPN simulator

Greetings :
Actually I just would like to refer that I was eager to use returned data from paypal and sofort... before being added to database and logfile, that is why I created a session variable in related file referred in other messages and use it in layout override of finish.php. In regard with performance it is good yet as I already mentioned in next update of joomshopping the session variable is gone , although it is only a two line codes.
So best and safest way to collect data from the tables: #__jshopping_orders and #__jshopping_order_item is just using userobject and getting user->id to find the order_id of client's order, a bit lower in performance but no problem with the next joomshopping update rises.
Hope this will help the learners and thanks again for the support
Kian William

 
StartPrev 1 2 NextEnd


Copyrights MAXXmarketing GmbH. Alle Rechte vorbehalten
Durch die Nutzung dieser Website stimme ich zu, dass Cookies zur optimalen Gestaltung der Website sowie zur Analyse der Nutzung der Website verwendet werden. Weiterführende Informationen finden Sie hier. OK, einverstanden.