8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'app/controllers/spree/paypal_express_callbacks_controller.rb', line 8
def notify
retrieve_details
@notification = Paypal::Notification.new(request.raw_post)
if @notification.params["payment_type"] == "echeck" && @notification.acknowledge && @payment && @order.total >= @payment.amount
@payment.started_processing!
@payment.log_entries.create(:details => @notification.to_yaml)
case @notification.params["payment_status"]
when "Denied"
@payment.failure!
when "Completed"
@payment.complete!
end
end
render :nothing => true
end
|