How to contribute core changes to payment/checkout code?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 anos atrás
I have modified nop v3.10 to allow for integration with NMI gateways (Arrow Payments, Braintree, Planet Authorize, etc).  The goal is to ensure that card data is not "stored, processed, or transmitted" by the web server, while keeping the customer on the website.  In theory, this takes the web server out of PCI scope.

There are a lot of changes across the entire core codebase to make both multi-page and single-page checkouts work, but I've been careful not to break the payment plugin architecture, nor have I disturbed the existing checkout page flow.

I would like to contribute the changes and have my code reviewed, but I'm not familiar with the process.  Where do I start?
11 anos atrás
Go to CodePlex and create a fork.  Make your changes there, then check it back in and create a Pull Request.  Someone from the dev team will review it and decide whether or not to merge your code in.

https://nopcommerce.codeplex.com/SourceControl/latest
11 anos atrás
So... my pull request got declined pretty quickly.

I feel like I didn't really do a good job communicating why the existing architecture needed to be adjusted for these new types of gateway integrations and why I feel it's important for PCI compliance.   (Or alternatively, I would like some advice regarding how to do the integration without changing the core.)

Do you have any suggestions?  Is there a way I can reach out to Andrei for further discussion?
11 anos atrás
hobbes wrote:
Do you have any suggestions?  Is there a way I can reach out to Andrei for further discussion?

Again thanks a lot for your contribution. But I've already explained here why it was declined. I've also read your reply. But hosted payment methods (such as PayPal, etc) requires redirection. This is how 99% of all hosted payment gateways work. And this is a standard. "iframe" payment methods are not supported now (and not planned yet) and I even don't know other shopping carts which work this way ("iframe" instead of real "redirection")
11 anos atrás
Thanks for the quick reply, Andrei!  

I understand completely:  This method of integration is perhaps a little too new to integrate into the core of nopCommerce, and it is not practical to cater to the small number of gateways that use it.  Perhaps when more gateways are on-board, I can resubmit my code for consideration.

As you suggest, I would still like to explore other ways to accomplish the integration without changing the core.  The main problem is that I need the PaymentInfo view to contain a form tag whose action looks like this:
<form method="POST" action="https://secure.payment-gateway.com/unique2345">
    .... Collect credit card number, expiration, etc here ....
</form>
The very first issue that me and other developers run into is that the form tag is generated by BeginRouteForm(), which cannot be used to generate an off-site URL.   Furthermore, the URL needs to be generated by the PaymentMethod.  

For multi-page checkout, using Javascript to set the form action seems like a bit of a hack, and so does calling HttpContext.Current.Response.Clear() to regenerate the page.

Any suggestions on how to cleanly do this?
11 anos atrás
You don't have to use - BeginRouteForm. You can manually generate <form> tag in your plugin's PaymentInfo view. But the issue is that we already have <form> generated in the "parent" \Presentation\Nop.Web\Views\Checkout\PaymentInfo.cshtml file. So it's not a way to go.

So you can suggest you only the following now:

1. Implement this payment plugin with a real redirection to a third-party site like it's done for PayPal Standard. I would do it this way.

2. More like a "hack". Find a way to put a java-script into the plugin's PaymentInfo view. So once it's loaded you'll redirect a customer to some new dedicated page of your plugin where a customer will see this this iframe.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.