8 – How to redirect customers to my payment gateway’s authentication page on an onsite payment gateway

This is on Drupal 8 using Drupal Commerce 2

I’m implementing an onsite payment gateway that can support 3ds authentication to credit cards from MasterCard/Visa.

How can I redirect customers to the offsite form on checkout?

What I have tried is doing is after calling a payment request to the payment gateway and reads that the status of the payment is “for Authentication”, i’ll use TrustedRedirectResponse to redirect them to authenticate there payment but somehow, TrustedRedirectResponse is not functioning.

Any leads will help!

p.s. Is there a way to add a PaymentOffsiteForm to my module and call it inside my createPayment() function inside my onsite.php

docker – nginx proxy_pass return 502 Bad Gateway

I’m building nginx for reverse_proxy with Spring and Docker

Here is my configuration.

nginx.conf

user  proxy;
worker_processes  auto;
error_log  logs/error.log;
error_log  logs/error.log  notice;
error_log  logs/error.log  info;
pid        logs/nginx.pid;

events {
    worker_connections  1024;
}

http {
    log_format  main  '$remote_addr - $remote_user ($time_local) "$request" '
    '$status $body_bytes_sent "$http_referer" '
    '"$http_user_agent" "$http_x_forwarded_for"';
    access_log  logs/access.log  main;
    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    keepalive_timeout   65;
    types_hash_max_size 2048;

    include       mime.types;
    default_type  application/octet-stream;

    include /home/wertkey/nginx/conf/conf.d/*.conf;

    client_max_body_size 200M;
    client_header_buffer_size  48k;

    server {
        listen       7070 default_server;
        listen       (::):7070 default_server;
        server_name  _;
        root         /usr/share/nginx/html;

        location / {
        }

        error_page 404 /404.html;
        location = /404.html {
        }

        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
        }
    }
}

conf.d/default.conf

server {
    listen 7070;
    server_name something.com;

    proxy_connect_timeout   900s;
    proxy_send_timeout      900s;
    proxy_read_timeout      900s;
    send_timeout            900s;

    location ^~ /editor/ {
        proxy_pass http://localhost:8081;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $host;

        rewrite ^/editor/(/.*)$ $1 break;
    }
}

docker

CONTAINER ID        IMAGE        COMMAND                  CREATED             STATUS              PORTS                    NAMES
a6a6a98a25a9        editor       "/bin/sh -c /usr/l..."   8 minutes ago       Up 8 minutes        0.0.0.0:8081->8080/tcp   editor

My spring server is running at 7070 port.
I want to be this way.

  1. request something.com:7070/api
  2. nginx proxy_pass to 8081
  3. and docker 8081 -> 8080

But response always return 502 Bad Gateway

What am i missing?

+
I am currently running two nginxs on the same server.
One is running at 8080 port and the other is running at 7070 port.
8080 nginx is for web servers and 7070 nginx is for proxy purposes.
The log does not appear in 7070 nginx and the log appears in 8080 nginx.
I don’t know why the request goes to 8080 nginx.
How can I send the request to 7070 nginx?

powerapps forms – Can SharePoint 2019 recognize users thru On-Premise Data Gateway?

We have a SP2019 setup for test purpose. Then we install on-premise data gateway in the environment. We can successfully connect the SharePoint data on-premise to Power Platform. Users can login PowerApps (vai userID@myfirm.com) can read/write/delete the data on-premise thru PowerApps.

However, we see the the “modified by” are the service account (mydomainserviceaccount) we used to setup data gateway. Is it possible SharePoint 2019 can recognize the user who is using PowerApp to update the data?

Which Payment Gateway is Best for India Opencart

guys i need help . i just created a site with opencart . i like to know which payment gateway module is for india .and how i connect this with SMS facility .

networking – How do you prevent a Windows Server 2019 network connection profile with no default gateway from reverting to “Public”

I am bringing up a new site and installing dual homed Windows 2019 RAS/Web servers. The interfaces on the DMZ must have a default gateway defined or they simply don’t work. The “internal” interfaces do not have a default gateway defined and this is fine once systems are attached to a domain controller

But while these systems are stand-alone, rebooting reverts the internal NICs profile to “public”. I, of course, change it back with Set-NetConnectionProfile. But next reboot and we are back where we started.

It is pretty darn annoying since I can no longer RDP to them! I am wondering if anyone has found a simple solution to this behavior.

Not interested in anything convoluted; no registry hacks or the like. As I say, once my domain controllers are up, this will take care of itself. But I deal with this incredibly moronic behavior (hope you are listening, Microsoft) every time I bring up a Windows site.

Clean Architecture Gateway layer depends on outer layer

Looking at the clean architecture layers and flow diagrams, and implemented it my self in my applications, I’ve always wondered which layer is supposed to contain the DB, or any 3rd Party service or SDK.

Looking at both of these images raises the question if there isn’t violation in the outer layers.

enter image description here

enter image description here

I’ve imagined the layers division like this:

enter image description here

But this means that there is a violation of the dependancy rule. Since the gateway always knows about both the external service, and the application it self, the entities.

Is there a correct way to draw these layers? I’ve read a couple of resources asking this question, but didn’t really get a full answers to what I need. For example: https://groups.google.com/g/clean-code-discussion/c/oUrgGi2r3Fk?pli=1, Doesn’t repository pattern in clean architecture violate Dependency inversion principle?

I get it that the meaning of clean architecture is kept, and the inner layers, the entities and the use case, aren’t affected by a change in the DB and the gateway, but was just wondering if maybe this is more accurate:

enter image description here

edit:

From the book:

Recall that we do not allow SQL in the use cases layer; instead, we use gateway interfaces that have appropriate methods. Those gateways are implemented by classes in the database layer.

So I guess this means that the data access is really in the most outer layer:

enter image description here

Maybe for this specific example, there is no real use for the interface adapters layer?

But also from the book about interface adapters layer:

Similarly, data is converted, in this layer, from the form most convenient for entities and use cases, to the form most convenient for whatever persistence framework is being used (i.e., the database). No code inward of this circle should know anything at all about the database. If the database is a SQL database, then all SQL should be restricted to this layer—and in particular to the parts of this layer that have to do with the database.

Also in this layer is any other adapter necessary to convert data from
some external form, such as an external service, to the internal form
used by the use cases and entities.

So it kinda contradicts that the data access is in the database layer, since this is what it does, converts from the DB, for example SQL rows, into the application’s entities. Are these layers not really separated? I’m confused.

magento2 – How to change the order status cancel in magento after payment cancelled from ccavenue MCPG Payment Gateway?

integrate my website with ccavenue MCPG payment Gateway. I have an issue on orders, if customer cancel the payment from payment gateway successfully return to website and show the order as cancelled but from the admin panel order status shows as pending.

How can i update order status as cancelled.

is there any Payment Gateway for ecommerce to accept Credit Card then withdraw bitcoins?

There is some payment gateway like 2checkout, Paypal, stripe, etc. That allow us to integrate via API to an eCommerce site, and then withdraw founds from there to bitcoin wallet ?

commerce – Integrating with Async Payment Gateway

Hey,

I am new to Drupal and Commerce,
I have to develop a Commerce Payment Gateway Plugin for a store in Drupal commerce 2.0,
We have two options either an On-site Payment or Offsite payment gateway,

Async Payment Gateway:
Create a Payment on the customer request by Payment Plugin Set the Payment Status to ‘PENDING’
After the customer paid the actual amount In a Bank or in a Portal(outside of the commerce store), Payment Gateway make Payment Status to ‘PROCESSED’ or ‘COMPLETED’
also notifies the Payment Plugins(who originally initiated the payment).
or Simply you can say IPN(instant payment notification) supported payment gateway.

so my Question :
Which option do I choose On-site Payment or Offsite payment gateway or maybe another option available?

Note: Commerce Payment Plugin Does not need to store payment Methods or
It does not require to redirect.
it just needs to call the gateway using (WS-SOAP) service and show the payment reference number to the customer and make Payment Status pending.
The plugin also needs to process Notification and change the Status to ‘COMPLETED’
so I am confused which method to use On-site Payment or Offsite payment gateway

ripple – how to create own Issued Currencies as payment gateway?

I want to create a payment gateway connecting a few banks. I want to create my own payment gateway Issued Currencies like “ABC”. What will be better to add Trust Lines between bank to bank or bank to my payment gateway?

I am using ripple lib javascript library.

  1. How can I Issue my own Currencies in my payment gateway using ripple lib?

  2. How can I create Trust Lines between bank to bank in my payment gateway using ripple lib?