Jump to content
  • 0

Rave Payment Gateway: Issue with redirecting


Question

Posted

Hi Guys,

I really need help.

I was given the task to build our gateway payment plugin for Blesta and I am having a little issue.

Anytime I click on "Pay With Rave" button, it redirects me to our payment page but it says page not found.

We tried checking our headers to make sure that it is not a cross-origin issue but everything is fine from our end. We noticed when we click the "Pay with Rave" button, the Request Method is POST but we need it to be GET. Is there a function to use in replace of the below:

$this->view->set('post_to', $post_to);
return $this->view->fetch();

4 answers to this question

Recommended Posts

  • 0
Posted

I think we'd need to know more about the payment flow for Rave in order to be of more help.

Blesta non-merchant gateways typically set a form in a view (e.g. /rave/views/default/process.pdt), which is what your code snippet fetches. Assuming the Form helper is being used, which defaults the method to POST, you can override the form method by updating the view as such:

<?php
$this->Form->create($post_to, ['method' => 'GET']);
...

 

  • 0
Posted
  On 1/22/2019 at 7:03 PM, Tyson said:

I think we'd need to know more about the payment flow for Rave in order to be of more help.

Blesta non-merchant gateways typically set a form in a view (e.g. /rave/views/default/process.pdt), which is what your code snippet fetches. Assuming the Form helper is being used, which defaults the method to POST, you can override the form method by updating the view as such:

<?php
$this->Form->create($post_to, ['method' => 'GET']);
...

 

Expand  

Working fine now. Thanks. 

If I want to replace the button "Pay with Rave" with an image, how should I do it?

  • 0
Posted

Please also...the $this->serializeInvoices(.....)...what those it return... it's preventing my code from running if I put it in the metadata that will be pass to the gateway

  • 0
Posted

How you choose to serialize invoices sent to the gateway is up to you and the gateway requirements. Each gateway is different. If you want invoices to be marked as paid in Blesta, you'll have to unserialize them when the gateway responds via the ::validate and ::success methods.

If you want to display an image as a button to pay with, I suggest taking a look at the PayPal Payments Standard gateway for reference. Simply create an image using the Form helper (i.e. Form::fieldImage()) to use as the submit button.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...