Jump to content
  • 0

Rave Payment Gateway: Issue with redirecting


emmajiugo

Question

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();
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

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']);
...

 

Link to comment
Share on other sites

  • 0
15 hours ago, 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']);
...

 

Working fine now. Thanks. 

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

Link to comment
Share on other sites

  • 0

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.

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
Answer this question...

×   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...