When you select your payment gateway and proceed to payment, you are prompt with a page that announce you that you will be redirected to payment provider.
As the transaction already created the url and no more post data is needed, there is no need to still display this page, we should use self::REDIRECT_GET on the buildRedirectForm to smooth the checkout for the customer.

CommentFileSizeAuthor
#2 use_redirect_get-3279865-2.patch386 bytesmistrae
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

Mistrae created an issue. See original summary.

mistrae’s picture

Version: 1.0.0-alpha3 » 1.x-dev
Status: Active » Needs review
StatusFileSize
new386 bytes

Patch attached

Status: Needs review » Needs work

The last submitted patch, 2: use_redirect_get-3279865-2.patch, failed testing. View results

znerol’s picture

Tried to figure out from the official documentation whether Postfinance actually specifies whether the request needs to be GET or POST. Reviewed the following documents:

  • Payment Page section in the Integration Modes chapter. (not specified)
  • API docs on the TransactionPaymentPageService::paymentPageUrl() method. That one has an interesting example (click on the PHP tab):
    [...]
    $transaction    = $transactionService->create($spaceId, $transactionPayload);
    $paymentPageUrl = $transactionPaymentPageService->paymentPageUrl($spaceId, $transaction->getId());
    
    header('Location: '. $paymentPageUrl);
    
  • The same piece of code is also in the README.md on the PHP SDK project.

So, yes. IMHO the POST step is superflous and should be removed.

znerol’s picture

Status: Needs work » Needs review

Switched to MR workflow and updated checkout form test.

znerol’s picture

Took this out for a manual test drive with the setup documented in the account setup guide.

The GET redirect works well and reduces the time from the review checkout pane to the payment form considerably.

  • znerol committed 774f317e on 1.x
    Issue #3279865 by znerol, Mistrae: Use REDIRECT_GET on CheckoutForm
    
znerol’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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