Jump to content

Non-Merchant Gateway Question


blazedd

Recommended Posts

We're wanting to develop and release the Paypal In-Context Payment form for Blesta. We've already worked on both a plugin, a merchant gateway, and have extensively used the API from within Blesta. We're starting to get a fairly good grasp on how most things work, but there's still some confusion regarding non-merchant gateways, which is preventing us from simply building the new gateway:

 

Question: Is there any support for non-webhook/payment notification gateways? 

 

For example the In-context gateway will perform the payment and guarantee a response immediately via a server-side request. It's somewhat similar to how some Credit cards work, where you effectively create a hold on the payment and then record the payment with a token provided from Paypal:

 

  1. Create payment token to Paypal, which includes sensative information regarding the payment's details (return URL, cancel url, etc)
  2. Build form with Paypal's Widget Javascript onto page
  3. User logs into Paypal without EVER leaving your website at all. The user also submits payment (or cancels the payment) with the popup UI.
  4. The user will be redirected to either the cancel url or the return payment url based on their action. Neither url is a notification url for internal use as the user's browser is used, rather than a webhook or IPN. When the payment was submitted by the user you MUST send a finalization request to Paypal to secure payment. This request will return the results of the payment, rather than an webhook/IPN. Paypal does not send an IPN for in-context payments.

Question: Could the class NonmerchantGateway methods buildAuthorizecapture, & void methods be used?

 

I noticed that the Payment gateway has methods as listed above, in the base NonmerchantGateway class, however they are currently registering unsupported errors rather than being blank functions. Based on other code in Blesta core it appears these methods are not yet supported. I just wanted to confirm that this is the case and see if there was any expectation to make them available.

Link to comment
Share on other sites

  • 2 weeks later...
On 7/26/2016 at 10:15 AM, blazedd said:

Question: Could the class NonmerchantGateway methods buildAuthorizecapture, & void methods be used?

I noticed that the Payment gateway has methods as listed above, in the base NonmerchantGateway class, however they are currently registering unsupported errors rather than being blank functions. Based on other code in Blesta core it appears these methods are not yet supported. I just wanted to confirm that this is the case and see if there was any expectation to make them available.

You could implement those NonmerchantGateway methods in your gateway, but they would never be called. Neither Blesta core nor the Order plugin implement them for use. You could create an order plugin that does call them, which could work in a similar way as the current buildProcess. However, there will probably be some additional changes necessary to fully support an 'in-context' payment transaction.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...