Hi,
I use 2checkout for different websites hosted on the same server. I need to add the following for 2checkout on Ninja Invoice,
&x_receipt_link_url=https://www.mkiddtech.co.uk/invoice/public/complete
I cant work out where to add this, can anyone help?
hillel
February 3, 2017, 12:20am
2
You’ll most likely need to modify this file:
app/Ninja/PaymentDrivers/TwoCheckoutPaymentDriver.php
You may be able to do this by overriding the paymentDetails function as seen here:
https://github.com/invoiceninja/invoiceninja/blob/master/app/Ninja/PaymentDrivers/PayPalExpressPaymentDriver.php#L13
Hi Hillel Coren,
Thank you for your post, I was just about to make an update to this post, I figured it out after scrolling though hundreds of lines of code from various scripts!
It needed to be passed to 2checkout with the Product ID, which i eventually found gets generated in,
/ninja/app/Http/Controllers/OnlinePaymentController.php on line 286
changed it from
$product = Product::scope(Input::get('product_id'))->first();
to
$product = Product::scope(Input::get('product_id&x_receipt_link_url=https://www.mkiddtech.co.uk/invoice/public/complete'))->first();
did a test purchase and success!
hillel
February 3, 2017, 12:30am
4
I’m happy it works but I’m not sure how or why, the code doesn’t look right to me.
I admit it might not be in the technically correct place or script, but it seems to work. I’m no coding expert lol
It would be handy to have an option for this built into the application from the GUI with a simple enable switch.
hillel
February 3, 2017, 12:47am
6