Forums

What payment mothods are possible with chronoform 5 redirect action

ArnKor 16 Nov, 2015
Hello,

i would like to use chronoform for payment with paypal. What payments are possible? Are they dependent on what action I am using? Are there any limitations using the chronoform paypal integration?

Thanks & kindest regards,
AK
GreyHead 16 Nov, 2015
Hi ArnKor,

You can do pretty much any kind of payment from ChronoForms to PayPal or anyone else with a little work. What is it that you want to do with PayPal? The PayPal ReDirect action is good for any method that requires you to send the User to PayPal to confirm the payment.

Bob
ArnKor 16 Nov, 2015
Hello Bob,

thanks for your quick reply!

As my customers are located in Brazil they are used to pay theire bills via credit card in 1 up to 12 times monthly installment deposit.

So my payments would be

- one time bank transfer/credit card payment
- monthly bank transfer/credit card payment up to 12 times

is this possible? Do i have to configure this in the redirect action or in my paypal account (sandbox)

One more question: What is the difference between redirect action and the paypal pro action?

Thanks once again & kindest regards,
AK
GreyHead 18 Nov, 2015
Answer
Hi AK,

I don't think that the standard ChronoForms PayPal actions will support recurring payments. They are only designed for one-off payments.

I would suggest that you use a PayPal API library for this. I have successfully used the Lionite libray with ChronoForm and it works well (I wasn't working with recurring payments but the docs there say that they are supported).

Bob
ArnKor 18 Nov, 2015
Thank you Bob!

I will have a look on this.

Kindest regards,
AK
ArnKor 23 Nov, 2015
Hello Bob,

i set up a recurring payment option in my paypal account. Is it possible to use this with the redirect action? How to offer this payment to the buyer? I think this is confusing...

Thanks & kindest regards,
AK
GreyHead 23 Nov, 2015
Hi ArnKor,

What exactly is confusing?

The PayPal ReDirect action sends the user to PayPal together with a set of parameters - you can set the parameters and the values.

Bob
ArnKor 23 Nov, 2015
Hello Bob,

sorry for the confusion!

I offer an installment plan for payment to my customers. I added this plan in paypal backend. Please see screenshot for error messsage.

Redirect is configured with currency < BRL > and the parameter <_xclick-payment-plan >

Could it be that the redirect action is configured to paypal US only?

Thanks & kindest regards,
AK
GreyHead 23 Nov, 2015
Hi ArnKor,

It looks as though you have BRL set correctly - presumably it is enabled in PayPal too?

Please turn Debug on in the PayPal Redirect action and see what values are being set.

Bob
ArnKor 23 Nov, 2015
Hello Bob,

yes currency seems to be alright. But the amount and article seem to bemissing although it is configured in the action.Please see screenshots.

Thanks & kindest regards,
AK
GreyHead 23 Nov, 2015
Hi ArnKor,

Please PM me the Debugger output as text (or add it here in Private tags) - there is something wrong at the end of the return_url - there is no & before the article or cy_code. It should be return_url= . . .&article= . . . &cy_code=BRL& . . .

Bob
ArnKor 23 Nov, 2015
...yes it is enable in paypal as it is a brazilian account...
ArnKor 24 Nov, 2015
Hi Bob,

i sent you the data via PM.

Thanks & kindest regards,
AK
GreyHead 24 Nov, 2015
HI AK,

Looking at the URL it includes this url_encoded element
&return=http%3A%2F%2Fdomain.com%2Findex.php%2Fpt%2F%3Foption%3Dcom_content%26view%3Darticle%26id%3D119¤cy_code=BRL

If I decode this it gives
&return=http://domain.com/index.php/pt/?option=com_content&view=article&id=119¤cy_code=BRL

There are a couple of problems here:

+ The &s in the URL may be troublesome, if you want to return the User to an article I suggest that you create a menu item with an alias and use that URL here e.g. http://domain.com/article-alias

+ There is an ¤ in front of the cy_code code where there needs to be an & - I don't know why this is happening.

+ The amount being passed is 0

What exactly do you have in the Return URL - does it have an & at the end?
ArnKor 04 Dec, 2015
Hello Bob,

thank you for taking the time!

I am working quite a bit on getting this paypal form to work. I understand what you said. First i changed the return url.
My configuration of the form (shown in screenshot) is:

This is private content



So i think i just used all fields normaly. And the form is from the paypal example. What could be wrong here? Any help appreciated!

Thanks & kindest regards,
AK
GreyHead 04 Dec, 2015
Hi ArnKor,

What is the problem you are seeing? Everything in your post looks OK to me.

Please drag a Debugger action into the On Submit event, then submit the form and post the debug results here.

Bob
ArnKor 04 Dec, 2015
Hello Bob,

actually there is no change. I still cannot get it to work. The debug output seems still wrong:

This is private content



There are still symbols in there which should not be there. But where do they come from and how to avoid them?
And the paypal message shows error shown in screenshot.

Thanks you & kindest regards,
AK
GreyHead 04 Dec, 2015
Hi ArnKor,

After a lot of debugging I think that I have found the problem in the code for the PayPal Redirect action. If you can please edit the file /administrator/components/com_chronoforms5/chronoforms/actions/paypal_redirect/paypal_redirect.php and look for code like this around line 119* and make the change shown:
		$fields = "";
		foreach($checkout_values as $key => $value){
			if(!is_null($value)) {
				$temp = urlencode($value);
				$fields .= "$key=".urlencode($value)."&"; // << edit this line to replace "&" with "&"
			}
I can't see exactly why but what is happening is that when just & is used the ¤cy_code gets treated as the HTML entity ¤ and converted to ¤cy_code :-(

Bob

* I only have the Trial version so it may be slightly different in the Paid one.
ArnKor 04 Dec, 2015
Hi Bob,

thank you for your time & investigation!

Ok, now it may get clearer: The folder your are mentioning is empty in my instalation (Please see screenshot). How to fix this? Should i reinstall everthing? Or can i copy only this file?

I also use the trial version ...

Thanks & kindest regards,
AK
ArnKor 04 Dec, 2015
Ok,

after reupload of the file the debug looks like:

This is private content



Paypal message is still the same...

Is the debug ok or should the be no ampersand at the end?

Any more ideas to get this working?

Thanks & kindest regards,
AK
GreyHead 04 Dec, 2015
Hi ArnKor,

I suspect that the problem is with the cmd=_xclick-payment-plan setting, if I change that to cmd=_xclick then there is no error message.

Does the payment-plan option have some different requirements? I'm not familiar with it at all.

Bob
ArnKor 04 Dec, 2015
Hello Bob,

yes the other option works perfectly. But meet not my requirements as clients in Brazil expect the option of a payment plan. So it is absolutely obligatory.

I will have another look on the specifications at developer@paypal.

Is there a chance to get Max involved for some more ideas? As there are options in this action to configure there should be a way to get this up and running with chronoforms I think.

Thank you so far & the best regards,
AK
GreyHead 04 Dec, 2015
1 Likes
Hi AK,

I checked the PayPal docs here - see Table 8 for instalment plans. It looks to me as if there are some required options that aren't included. Also maybe you have to set a currency for instalment plans separately from the general currency setting???

Bob
ArnKor 05 Dec, 2015
Hello Bob,

yes, these are the specification I looked up too and I see that this is the error!

What I also see now: Paypal offers all customers an option to pay up to 12 times or the whole ammount once. As this seems to be a feature in Brazil I am going to open an buyer account in Brazil the next days - I still have to figure out how to deal with paypal account requirement including adding a brazilian credit card ...

I will write about my efforts and the results after the test.

Thanks so far & kindest regards,
AK
ArnKor 08 Dec, 2015
Hello Bob,

as promised: Opened up a sellers and a buyers account. Configured the sellers account with the option for the clients to use an installment plan. There is no need to change the form command. So _xclick works: You are redirected, loggin in and offered the plan to pay.

This seems special to clients in Brazil. Please see screenshot for details. Hope that helps someone!

Thanks & kindest regards,
AK
GreyHead 09 Dec, 2015
Hi ArnKor,

Thank you - that is not something that I have seen before.

Bob
This topic is locked and no more replies can be posted.