× R0.24 No Longer Supported

[Solved] VirtueMart / Joomdle ordering process

14 years 9 months ago
Antonio Durán
Posts: 7815
More
[Solved] VirtueMart / Joomdle ordering process #21
This patch is for non html forms based payments.

I have never tested with the patch applied and paypal payments, so I am not sure what the problem here is.
You said you were not going to use paypal, but acs.

I guess you could just add those payments methods to be skipped....What I mean is that in the file you have a commented out line:
//if ($payment_class == 'ps_authorize') // In case you want only some payment methods

You could leave it like:
if ($payment_class != 'ps_paypal')

Don't know if this will help, as this would need digging into the purchase flow, to see what is happening.
The topic has been locked.
14 years 9 months ago
Kyle
Posts: 42
More
Topic Author
[Solved] VirtueMart / Joomdle ordering process #22
Code seems to make sense, as the HTML based Payment methods exclude what is currently listed. I will need to see if I can incorporate more inclusions, so that it will follow something similar to:

if($payment_class == 'ps_paypal') & ($payment_class != 'ps_authorize') & ($payment_class == 'ps_vcs')
do(bla bla)

Thanks Antonio, I'll give it a whirl.
The topic has been locked.
14 years 9 months ago
Kyle
Posts: 42
More
Topic Author
[Solved] VirtueMart / Joomdle ordering process #23
Hey Antonio,

I have edited the code to 'not allow' / 'allow' payment to the various payment gateways. Without knowing all the classes it pulls from, I am finding it hard to interpret the difference in the 2 files.

Why your new file, it does not open the i.e Paypal site to conclude the payment. To which after successful payment can send through the 'Enrol' link. It makes the entire process redundant to just give the user the enrol link before receiving confirmation. It sends the link immediately after clicking 'Confirm Order'.

Now my original ps_checkout-old.php does everything I need it to, in the process explained below. Please note that this payment is based on HTML BASED FORMS such as PAYPAL and my VCS:
    choose course
    select payment method, i.e Paypal/VCS (html based payment)
    click 'confirm order'
    directs you to specific site > make payment > confirm
    successful payment sends through confirmation to VM
    VM sends through link to user
    Link is for 'downloadable product as appose to your 'Enrol' link

The only issue I have, is getting hold of the 'Enrol' link. Thus your checkout file just needs to 'wait' for confirmation from the payment gateway, before sending off the link. Is there any way you can edit the code, that this will happen?
I am sure this will help any other user with the same issue.

I have attached my 2 files as per my explanation above.

FYI > My 2 payment options I am testing with, i.e VCS and Paypal use the HTML based form, use the following payment classes.
ps_vcs , ps_paypal.

Hope this helps. Let me know if I can supply any extra info.

Regards and thanks,

K

File Attachment:

File Name: ps_checkou...iles.zip
File Size:40 KB
Attachments:
The topic has been locked.
14 years 9 months ago
Antonio Durán
Posts: 7815
More
[Solved] VirtueMart / Joomdle ordering process #24
I looked around a bit and saw that vcs is paypal related.

So, let's talk about notification: how does VM know when a payment has been completed in VCS?

In paypal, you configure a IPN URL.
The topic has been locked.
14 years 9 months ago
Kyle
Posts: 42
More
Topic Author
[Solved] VirtueMart / Joomdle ordering process #25
Hi Antonio,

When looking at the VCS php files, namely 3 of them attached in the zip file. It takes the typical parameters from the 'checkout' page on VCS. It then relays these parameters values to what was inputted before being relayed to the VCS server.

Once the server validates, it simply sends VM the 'Confirmed 'Y'' status, or 'N' etc. As you know, VM will then have the confirm status and thus send the 'download' link to the user to download your product ordered/paid for.

So in a nutshell, I have no idea where/if it rewrites any IPN handler *above my head*, such as Paypal. However, if I have entered the following line in YOUR ps_checkout.php file.

if ($payment_class != 'ps_vcs') {

It will bring up the VCS site as it should. HOWEVER, the difference here to the orgiinal ps_checkout.php(ps_checkout.php-old) will send the download link when confirmed, YOURS, simply sends confirmation mail, and VCS sends a receipt mail, no download link.

So, this means your php file does not tell VM to send the 'Enrol' user link. Once again, I am not certain if Paypal will work, but I would assume it runs on the same platform in principle.

If you can edit your ps_checkout.php to pull the users details as it does, but after receiving payment via VCS/Paypal, it will solve the issue. Your file already pulls that information, but the code above that excludes the payment class, allows it to proceed to the Payment website, then redirects back. When that happens/upon successful payment, to THEN initiate the code that sends the link for enrolling?

Once again, I can provide any details you need. If you wish to simulate on my website, I shall provide you a test account. Else it works as per normal when registering. :)

Thanks Antonio, hope we can come to some resolution.

K

File Attachment:

File Name: vcs_files.zip
File Size:3 KB
Attachments:
The topic has been locked.
14 years 9 months ago
Kyle
Posts: 42
More
Topic Author
[Solved] VirtueMart / Joomdle ordering process #26
Hey Antonio,

Any updates on the issue above? It seems my whole issue boils down to the one ps_checkout.php file. Still having the issue why the payment confirmation doesn't even tell VM to send a 'download/enrol' link to the user with your checkout.php file.

I still don't know what is the fundamental difference in the 2 ps_checkout files??

Thanks again for all your trouble.

K
The topic has been locked.
14 years 9 months ago
Antonio Durán
Posts: 7815
More
[Solved] VirtueMart / Joomdle ordering process #27
Hi, what you say makes sense, but things are not that easy :)

There is no "after paypal" code.

Code to make a paypal transaction complete is done in paypal ipn handler. That is why I asked you about VCS: if it is a paypal related payment method, I guess it should have a ipn handler.

Go to the VCS payment method config, and look in Payment Extra Info.
Look for: notify_url
The topic has been locked.
14 years 9 months ago 14 years 9 months ago by Kyle. Reason: Site public
Kyle
Posts: 42
More
Topic Author
[Solved] VirtueMart / Joomdle ordering process #28
Hi Antonio,

When looking at the config area in VM for VCS. It appears that no 'notify_URL' has been used such as Paypals config. I am not certain on how this can invoke the change, but the mail issue stands at why your checkout.php file skips payment for all HTML based forms.

Has anyone not had this issue before. I cannot assume no one has used HTML based forms before while needing to enrol a user? I know the process works when inputting credit card details and clicking 'confirm order'.

The fact Paypal requires the IPN handler to be re-written is an issue by itself. But that won't matter becuase when selecting 'Paypal' as the payment method, it skips the website data and sends the enrol link right away. This typically because the 'if(payment_class == ps_paypal)' has not been specified. Naturally you can fix that with editing that one line..but when you do, it doesn't do anything.

Admittedly I have not tested with Paypal, as VCS is setup and working. It seems to be the IPN handler concept that it's lacking. I still go back to the ps_checkout.php file we have in place...am I correct in assuming this whole process will work if I select Paypal, and have the payment class != 'ps_paypal' in the ps_checkout.php file?

I am at a roadblock here..seems I can't progress further without your help :(

website name: test.com/ k
Username: ross
Password: ross123

Click on courses > enrol course
All payment methods are on test mode.

I have included the payment configuration for Paypal and VCS in VM attached. This will show what VCS does, as appose to Paypal's 'notify_url'.

Please note - Selecting Paypal will automatically enrol user. Only VCS works, short of sending enrol link.

If you do not wish to view the site, please let me know so I can remove the site details.

Regards, K

File Attachment:

File Name: Payments_V...nfig.zip
File Size:2 KB
Attachments:
The topic has been locked.
14 years 9 months ago
Antonio Durán
Posts: 7815
More
[Solved] VirtueMart / Joomdle ordering process #29
Ok, now it is clear for me that I was right: you need to modify the ipn handler to work with Joomdle.

Looking at the config:
"osApprovedUrl" => "$mosConfig_live_site/index.php?option=com_virtuemart&orderid=$order_id&page=checkout.vcs",

That is the ipn handler: checkout.vcs.php.

Ah, and you need to go back to the original ps_checkout file, with no patch applied.
The topic has been locked.
14 years 9 months ago
Kyle
Posts: 42
More
Topic Author
[Solved] VirtueMart / Joomdle ordering process #30
Ok, so I have replaced the ps_checkout.php with the original file. When doing my VCS payment, sends the download link as per normal. No resolve there unless I can try fix what you stated above.

As for the Paypal side, you are saying that inside the Joomdle App itself, you have configured the Paypal IPN handlers, so that it will send the 'enrol' link as before, while working as per normal.

I will need time to test the Paypal, but I do not think it will work? Can you verify that it has worked before. You have seen the files I provided you already.
The topic has been locked.