Pay - Undefined Method

payments
php

#1

Whenever I try to pay for an order using:
$payment = $order->pay(‘manual’, ‘purchase’, $params);

I recieve an error message on my site:
Fatal error: Call to undefined method Moltin\Response::pay() in…

any indications as to why?

Thanks


#2

Hi have you checked out before calling order->pay like the followig?

$order = $moltin->cart($cartID)->checkout($customer, $billingAddress, $shippingAddress);

Also if you could show us your preceding code to this call that would be great.

Thank you


#3

$order = $moltin->cart(‘cart1234’)->checkout($customer, $billing, $shipping);
$gatewaySlug = ‘manual’;
$paymentMethod = ‘authorize’;
$params = array();
$payment = $order->pay(‘manual’, ‘authorize’, $params);
$id = $order->getID();

I have indeed, and I can see the order in the dashboard

Thanks

David


#4

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.