schmittjoh/JMSPaymentPaypalBundle — Issue #15: cannot reach approved status
Author: makasim
Created: 2011-12-20 12:47:14+00:00
State: open

It is often the paypal payment `$this->requestDoExpressCheckoutPayment` is finished with these:

PAYMENTINFO_0_PAYMENTSTATUS: pending
PAYMENTINFO_0_PENDINGREASON: multi-currency

so the code

```php
setReferenceNumber($response->body->get('PAYMENTINFO_0_TRANSACTIONID'));
$transaction->setProcessedAmount($response->body->get('PAYMENTINFO_0_AMT'));
$transaction->setResponseCode(PluginInterface::RESPONSE_CODE_SUCCESS);
$transaction->setReasonCode(PluginInterface::REASON_CODE_SUCCESS);
```

is never executed and I cannot finish the payment.

If I tried to call `aproveAndDeposit` once again the `requestGetExpressCheckoutDetails` method returns checkout status:

CHECKOUTSTATUS: PaymentActionCompleted

which is not supported.

what about to add:

```php
body->get('CHECKOUTSTATUS')) {
// ...
case 'PaymentActionCompleted':
$transaction->setReferenceNumber($details->body->get('PAYMENTREQUEST_0_TRANSACTIONID'));
$transaction->setProcessedAmount($details->body->get('PAYMENTREQUEST_0_AMT'));
$transaction->setResponseCode(PluginInterface::RESPONSE_CODE_SUCCESS);
$transaction->setReasonCode(PluginInterface::REASON_CODE_SUCCESS);
return;

//...
}
```