Change return type of payment provider
Posted: 18 Jun 2021, 07:57
Hi
Iam working on aimeos/laravel version (on php 7.4)
I’ve created an extension to handle our custom methods , and in this case working on custom payment method for Stripe paymentIntent.
My problem is on “process” function of the payment provider , I need to return a json value ( which is returned form stipe paymentIntent api(Secret_key) ) using Response() method of laravel.
But the process function has a return type of “…\Helper\Form\Iface” and I can not change it from anywhere .
I used ‘ print “”; and exit; ‘ for my solution but I know its not a good way.
I am wondering is there any function that i can use to return a json ( so I don’t need to change the return type ) ?
BTW just thinking maybe there is an extension done and not need to spend time for it .
PS : i've attached my code here : https://ibb.co/fq69NRB
Iam working on aimeos/laravel version (on php 7.4)
I’ve created an extension to handle our custom methods , and in this case working on custom payment method for Stripe paymentIntent.
My problem is on “process” function of the payment provider , I need to return a json value ( which is returned form stipe paymentIntent api(Secret_key) ) using Response() method of laravel.
But the process function has a return type of “…\Helper\Form\Iface” and I can not change it from anywhere .
I used ‘ print “”; and exit; ‘ for my solution but I know its not a good way.
I am wondering is there any function that i can use to return a json ( so I don’t need to change the return type ) ?
BTW just thinking maybe there is an extension done and not need to spend time for it .
PS : i've attached my code here : https://ibb.co/fq69NRB