PayPal

I have found the part of the custom IPN Handler where I can input my element whose value has to be set for a successful transaction. Now what do I do? So I make the edit and rename the file to something else? If so, what do I rename the file to and where do I put it? Or this signup_ipn.php is what I am editing and I just re-upload the file to the same location. What do I do?

One last thing, what did I do wrong? Why wasn't it working? Cause I have to apply this Paypal option to another form of the same single one time figure as well as another form that has many payment values. So I need to understand what went wrong and why.
 
The last hurdle to cross with this Paypal thing is to set the value of the 'approved' element to 'yes', the default value is 'no'.
So first I tried using the IPN Custom Value and IPN Custom Element. The element is 'Approved' and I set the value like this
Code:
That didn't work so I looked at both the
Code:
paypal_ipn_example.php
signup_ipn.php
And created a new line in the 'paypal_ipn_example.php' that has the following:
Code:
$set_list['approved']="yes";
Uploaded the file and nothing happened. The value is not being set to 'yes'. So I tried renaming the file to
Code:
paypal_ipn_custom.php
nothing worked. What do I do here?? I need some help.
 
Last edited:
I did have the paypal_ipn_custom.php selected but nothing worked. I started to pull back a few things cause my Internal Id or 'Skill ID' was not working. The skill id solution came from the Internal ID thread and all of a sudden it stopped working. I assumed the paypal was causing this. But I did try both the paypal_ipn_custom.php and the paypal_ipn_example.php and nothing worked. I am caught out here. I don't even have the papal working but at the same time I suspect it's causing a bigger problem as the skill id figure is not generating. For php plugin for some reason this code is not firing and my leading suspect is the paypal plugin
Code:
$myId = (int) $formModel->formDataWithTableName['advertise_your_trade_or_ser___id'];
$mySerial = sprintf('%06d', $myId);
$myDb = FabrikWorker::getDbo();
$myQuery = $myDb->getQuery(true);
$myQuery->update('advertise_your_trade_or_ser')->set('my_skill_id = ' . $myDb->quote($mySerial))->where('id = ' . $myDb->quote($myId));
$myDb->setQuery($myQuery);
$myDb->execute();
What do you think?
 
The code above is the php plugin that executes to generate a 6 digit skill id with leading zeros. This worked quite fine until the paypal plugin was installed and configured.
 
I'm not at my computer right now. Can you check that I didn't unpublish it while testing PayPal?

Sent from my HTC One using Tapatalk
 
Very very impressive. You are correct. That was the issue with the skill id. Wheeeeeew! Thanks a million. Now it's back to the problem of the approved element not setting the value to 'yes' after a successful Paypal transaction. I have renamed the paypal example to paypal_ipn_custom.php, set the line to "$set_list['approved']="yes";" and I have referred to the file in the IPN Php File. After completing a successful payment, when I re-direct back to the List page the entry does not show. I've included the sandbox buyer credentials in the mysites if you wish to test. The entry shows once the Approved element is set to 'yes' for the given entry. The default value is 'no'.
 
Last edited:
Try now.

In the IPN handler, you had put that ...

Code:
$set_list['approved']="yes";

... in the body of the IPN handler file, rather than in the _Completed method ...

Code:
    function payment_status_Completed($listModel, $request, &$set_list, &$err_msg) {
            $set_list['approved']="yes";
            return 'ok';
    }

You might also want to modify the example _Pending method, which currently sends an email.

-- hugh
 
I just did a test and the Approved element did not change to 'yes'. It remained in a state of 'Not Approved' whose value is 'no'. I have included the screenshot. The acid test is to go back to the 'seller's' site after the paypal purchase. You're supposed to see your entry to the top. All new entries will show at the very top. The link paypal re-directs back to is
http://www.caribbeanskills.com/index.php/all-trade-services

I just did my entry and the Approved did not change to 'yes'. It remained in its default state of 'no'.
 

Attachments

  • approvedLink.png
    approvedLink.png
    320.5 KB · Views: 200
The approvedLink screenshot is the superuser view. If you were viewing the entry publicly, it just wouldn't show cause the Approved element value is still set to 'no'
 

Attachments

  • approvedLink2.png
    approvedLink2.png
    307 KB · Views: 200
No, they are not being saved? Why? I have the IPN Txn-Id Element mapped to ppal_txn_ID field and the IPN Status Element mapped to the ppal_status field and both are not saving values. I just did an entry and both are blank? I have those fields hidden by the way and I'm hoping that's not an issue. They can't be viewable to the public I assumed so I set them to hidden. Why is it they aren't being populated?
 
I have done several tests here and I am confused. The mapped fields are working else the sandbox would not have deducted the correct amount from the test buyer's account. So I know at least that field is sending data to Paypal, however is it that Paypal is the one who generates the Txn-Id value? If so do I have to do some kind of setup on the sandbox account other than the buyer and facilitator account? I've noticed an IPN Simulator on the dashboard but throughout this thread no mention was really made of this simulator. Additionally I did not give this much weight as when I went into it, I saw it really was an IPN Triggered simulator. So filling out the fields and pressing the button was supposed to 'Trigger" an IPN message as opposed to the message being triggered one time during the actual transaction.
I am stuck here. Hoping I can get a response.
 
Can you check the Fabrik log table (#_fabrik_log) and see if there are any error msgs in that.

For each transaction there should be two ipn related log entries, a fabrik.ipn.start, and then one of form.paypal.ipn.Complete, or form.paypal.ipnfail.Foo (where Foo is some error keyword).

-- hugh
 
The response:
Code:
No IPN txn or status fields specified, can't test ...
confuses me as this has been done. Unless a dropdown field cannot be used and a normal blank field has to be used. Additionally the
Code:
Can't load the custom IPN handler class
has me lost. The screenshot is attached.
 

Attachments

  • fabrikLog.png
    fabrikLog.png
    40.9 KB · Views: 205
Last edited:
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top