Paypal statuses in Magento - php

We're facing a problem with paypal in ou Magento Shop (CE 1.7)
Here is the history of our statuses :
-Pending Payment
-Payment verification
-Payment refused by Paypal
But when the payment is refused by paypal, it creates an invoice, then a creditmemo. I don't want this, when the invoice is created, it ask our team to ship the order but this order do not need to be shipped.
How to avoid creating the invoice, or when creating the invoice having a param that stop my shipping process.
Best Regards,

Out-of-the-box Magento requires an invoice to make online payment authorization (or capture), that is to make a request to PayPal and try to charge customer. You should not rely on invoices when shipping orders. In Magento you should use order status instead.

Related

Enable a payment gateway only if the customer couldn't complete the order with another gateway in woocommerce

I have a woocommerce subscription website with two payment gateways (one is recurring and the other is manual). All my subscriptions are auto-renewable. What I'm trying to achieve is that the customer cannot use the manual payment gateway unless the order status changes to pending/failed for that order. So if the customer couldn't complete the order using the recurring gateway and visit the checkout page again, then they should be able to see the manual payment gateway option on the checkout page and pay using it. Is it possible? How can I achieve that? Thanks in advance.

Order does not exist in Magento but customer has paid for it

One situation was happened in my website which build in Magento.
Situation is : A customer added products in cart, he bought products using Paypal express checkout payment method. he did the transaction in Paypal, money was deducted from his account but the order was not created in Magento due to unknown issue(I think due to internet issue on client machine or our server issue).
What I want do now : I got his cart detail from sales_flat_quote and sales_flat_quote_item table. I want to generate an order using this detail using Paypal payment method progamatically . customer has send us the Paypal transaction id, invoice id from Paypal and also shipping address.
Can anyone tell me how to do this ?

Magento secure trading payment method need to hold a payment option

In my magento store have many customers. I want to offer my old customer with this special option.
(i.e) No need to pay at the end of the sale. They can pay later with their outstanding invoices by online mode. Is there any possible to set this option with magento store.
I m using Secure trading payment gateway.
Thanks
Yes, You could implement payment method for special customer group and this payment method Will only generate invoice for the sales order and set its status to Pending.
Then you will do another module that add tab to the customer account page ( for example Pending Invoices ), And this module generate payment form based on invoice/order data and when they pay it you mark the invoice as paid and captured.
Its straight forward concept if you know that Magento Invoices has Statuses ( Paid, Pending, Canceled ) And you can check the invoices from sales->invoice ( just like the orders !)

Set shipping address in PayPal Adaptive Payment call

For a marketplace project, I use the PayPal Adaptive Payment to make parallels payments between the buyer, products salers and the website Paypal account for fees.
In order to apply the Seller Protection, I need the buyer to select a shipping address but I can't find any option to send it.
It seems that I can set the option "requireShippingAddressSelection" to true only with embedded payment flow but is there any way to send a custom address with? And above all, does this option make the payment available for the PP seller protection which is what my client really looking for?
You'll need to use SetPaymentOptions to include details like shipping address, order items, shipping amount, tax amount, etc.
Your Pay request action will be set to CREATE and then you'll pass that PayKey into SetPaymentOptions to set all of the other details prior to redirecting the user to PayPal to complete the checkout.

Magento - Create credit memo / refund programmatically through code

Is there any way of creating a Credit Memo / Refund dynamically through code. I am aware of the fact that Credit Memo can be created using back-end functionality on an invoice but I would like to create a credit memo for a specific order separately based on the following requirements
For selected items
Deduct the shipping cost from the refund
Updating the Stock Qty back
Contacting my payment gateway to perform this refund and transfer the money back into customer's account
I have Sagepay module installed as well for payment purposes and the Refund happens fine using Magento's in built functionality and Sagepay together. But I would like to create a Refund when a customer after shipment asks for refund for few items or all items of a order.
I have created a custom module and am calling a function to perform the refund action. So on call of this function I want to dynamically create Refund for selected items and contact Sagepay to perform the refund transaction for the customer and Magento to update the stock back.
I would just like some help on the starting bits as to where to look for the code and how to combine Sagepay's refund functionality along with Magento's in built one in my module's function call etc ?
Any help is appreciated. Thanks in advance.
I have found an API(see link below) for creating credit memos.
http://www.magentocommerce.com/boards/errors.php/viewthread/215141/

Categories