Currently we have two magento independent websites. One is behaving as storefront and other as back end. User can place the order at front end.
So same order I am trying to create programmatically at back end. When user pay through checkmo
payment method it works. But when user pays through PayPal it is not working. So anybody knows how we can create order programmatically using PayPal payment methods? Is it possible or not?
$quote->getPayment()->importData(array(3) {
[method] => paypal_express
[last_trans_id] => 65Y31421KL2753028
[additional_information] => Array
(
[paypal_express_checkout_shipping_method] =>
[paypal_payer_id] => 5LX84SUFY39L4
[paypal_payer_email] => [email protected]
[paypal_payer_status] => verified
[paypal_address_status] => Confirmed
[paypal_correlation_id] => b78b4e5e6e527
[paypal_express_checkout_payer_id] => 5LX84SUFY39L4
[paypal_express_checkout_token] => EC-7P402752023166448
[paypal_express_checkout_redirect_required] =>
[paypal_protection_eligibility] => Eligible
[paypal_payment_status] => pending
[paypal_pending_reason] => authorization
)
});
Error: PayPal gateway has rejected request. A successful transaction has already been completed for this token (#10415: Transaction refused because of an invalid argument. See additional error messages for details).