Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hosted Payment Pages #7

Closed
igorhoogerwoord opened this issue Jul 27, 2016 · 2 comments
Closed

Hosted Payment Pages #7

igorhoogerwoord opened this issue Jul 27, 2016 · 2 comments
Assignees
Labels
Milestone

Comments

@igorhoogerwoord
Copy link

igorhoogerwoord commented Jul 27, 2016

Right now, following the documentation a developer uses a 'hidden' html form element with a POST action.

<form method="post" id="adyenForm" action="https://test.adyen.com/hpp/skipDetails.shtml" name="adyenForm" target="_parent" style="display:none">
     <input type="hidden" id="merchantSig" name="merchantSig"/>
     <input type="hidden" id="sessionValidity" name="sessionValidity"/>
     <input type="hidden" id="shopperLocale" name="shopperLocale"/>
     <input type="hidden" id="merchantAccount" name="merchantAccount"/>
     <input type="hidden" id="paymentAmount" name="paymentAmount"/>
     <input type="hidden" id="currencyCode" name="currencyCode"/>
     <input type="hidden" id="skinCode" name="skinCode"/>
     <input type="hidden" id="merchantReference" name="merchantReference"/>
     <input type="hidden" id="brandCode" name="brandCode"/>
     <input type="hidden" id="issuerId" name="issuerId"/>
     <input type="hidden" id="merchantReturnData" name="merchantReturnData"/>
     <!-- for recurring hpp -->
     <input type="hidden" name="shopperEmail" value="s.hopper@test.com" />
     <input type="hidden" name="shopperReference" value="Simon Hopper" />
     <input type="hidden" name="recurringContract" value="RECURRING" />

     <input type="submit" value="Send"/>
     <input type="reset"/>
  </form>

An option would be that the Adyen library sends this post request and redirects the page on calling a 'HPP payment' method. This would make it easy, except for the fact that redirects are handled in the Python server's request handler, which Adyen Api users need to program themselves.

Still trying to find a clean solution for this, if not found, the POST with form data is the best option available for websites/apps.

Recurring:

What to do with the recurring form fields if not used?

@igorhoogerwoord igorhoogerwoord added this to the Beta 1 milestone Jul 27, 2016
@igorhoogerwoord igorhoogerwoord self-assigned this Jul 27, 2016
@igorhoogerwoord
Copy link
Author

igorhoogerwoord commented Aug 1, 2016

Sending HPP Post

Sending the HPP form data through the Adyen Api is impossible, because the session for the requesting server can't be carried over to a user's browser or app. The form data must be submitted from the client where the HPP payment will be completed.

I will simply create a function to validate the HPP fields, create the merchantSig using 'generate_hpp_sig' from util.py. This returns the url and HPP form data fields including the merchant signature.

Same function can be used for recurring payments with HPP, for this I extend the validation of fields based on if the recurring properties are existing and set.

@igorhoogerwoord
Copy link
Author

Directory lookup and hpp payment completed.
However:

  • validation is not yet complete for required properties ( unsure which are required )
  • POST hpp is not yet implemented because unsure about useful structure for passing back the redirect url to the api end user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant