With the way the modal works, we should be able to open it on the review step vs. on the redirect page in a fashion similar to the Stripe Payment Element integration.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rszrama created an issue. See original summary.

vmarchuk made their first commit to this issue’s fork.

vmarchuk’s picture

Version: 2.0.x-dev » 2.x-dev

vmarchuk changed the visibility of the branch 3517255-open-the-affirm to hidden.

vmarchuk’s picture

Status: Active » Needs review
rszrama’s picture

Status: Needs review » Needs work
StatusFileSize
new34.31 KB

I had to reroll this to accommodate changes from other merges (attached). When testing, I noticed I'd end up on the payment redirect step (e.g., /checkout/8/payment) instead of the simulated successful return from a redirect to advance my order to the checkout completion page. The payment authorization went through fine and the Payment entity was created, I just didn't end up on checkout complete.

rszrama’s picture

This still appears to be missing return processing that would actually place the order.

rszrama’s picture

Status: Needs work » Needs review
StatusFileSize
new37.06 KB

Full patch attached with changes to RedirectForm to copy what we do in StripePaymentElement.

rszrama’s picture

Status: Needs review » Fixed

I refined this a little bit to only directly place the order on return when the modal is being used; redirected customers will process through normal checkout flow completion. Committed!

  • rszrama committed 2843ea91 on 2.x
    Issue #3517255 by vmarchuk, rszrama: Open the Affirm modal on the review...

rszrama changed the visibility of the branch 3517255-open-affirm-modal-review-step to hidden.

rszrama’s picture

No clue how to delete the issue fork. I ended up just committing via a patch I finalized locally.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.