I am creating a purple payment extension that does the following:
When a user clicks on a check on the sellerβs website, he is redirected to the website (for example, paypal), where he enters his payment information. If the payment method fails, the user is redirected to the sellerβs website.
However, the quote seems to be inactive.
What are the features that allow the end user to reuse his quote?
A few possibilities:
- Duplicate quotes if the user returns.
- Get a quote and set it to active so that it shows again
Here is the code that I use in my payment model:
To initialize a payment method before pending_payment
public function initialize($paymentAction, $stateObject)
{
$state = Mage_Sales_Model_Order::STATE_PENDING_PAYMENT;
$stateObject->setState($state);
$stateObject->setStatus(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT);
$stateObject->setIsNotified(false);
}
To redirect to a payment method (URL will be redirected to the remote host)
public function getOrderPlaceRedirectUrl()
{
return Mage::getUrl('pay/payment/redirect');
}
url/pay/payment/fail ( , , - ).