Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 6803 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 6803 Rev 6849
Línea 44... Línea 44...
44
use LeadersLinked\Model\UserType;
44
use LeadersLinked\Model\UserType;
45
use LeadersLinked\Model\User;
45
use LeadersLinked\Model\User;
46
use LeadersLinked\Library\QueueEmail;
46
use LeadersLinked\Library\QueueEmail;
47
use LeadersLinked\Mapper\EmailTemplateMapper;
47
use LeadersLinked\Mapper\EmailTemplateMapper;
48
use LeadersLinked\Model\EmailTemplate;
48
use LeadersLinked\Model\EmailTemplate;
49
use LeadersLinked\Cache\CacheInterface;;
49
use LeadersLinked\Cache\CacheInterface;
-
 
50
use LeadersLinked\Cache\CacheImpl;
-
 
51
use PayPalHttp\HttpException;
-
 
52
use PayPalCheckoutSdk\Core\SandboxEnvironment;
-
 
53
use PayPalCheckoutSdk\Core\ProductionEnvironment;
-
 
54
use PayPalCheckoutSdk\Core\PayPalHttpClient;
-
 
55
use PayPalCheckoutSdk\Orders\OrdersCreateRequest;
-
 
56
;
Línea 50... Línea 57...
50
 
57
 
51
 
58
 
52
class AccountSettingController extends AbstractActionController
59
class AccountSettingController extends AbstractActionController
53
{
60
{
54
    /**
61
    /**
55
     *
62
     *
56
     * @var AdapterInterface
63
     * @var AdapterInterface
Línea 57... Línea -...
57
     */
-
 
58
    private $adapter;
-
 
59
    
-
 
60
    
-
 
61
    /**
-
 
62
     *
-
 
63
     * @var CacheInterface
-
 
64
     */
64
     */
65
    private $cache;
65
    private $adapter;
66
    
66
    
67
    /**
67
    /**
68
     *
68
     *
Línea 74... Línea 74...
74
     * 
74
     * 
75
     * @var array
75
     * @var array
76
     */
76
     */
77
    private $config;
77
    private $config;
Línea -... Línea 78...
-
 
78
    
78
    
79
    /**
-
 
80
     * 
79
    
81
     * @var CacheInterface
-
 
82
     */
80
    
83
    private $cache;
81
    
84
 
82
    /**
85
    /**
83
     * 
86
     * 
84
     * @param AdapterInterface $adapter
-
 
85
     * @param CacheInterface $cache
87
     * @param AdapterInterface $adapter
86
     * @param LoggerInterface $logger
88
     * @param LoggerInterface $logger
87
     * @param array $config
89
     * @param array $config
88
     */
90
     */
89
    public function __construct($adapter, $cache , $logger, $config)
91
    public function __construct($adapter, $logger, $config)
90
    {
92
    {
91
        $this->adapter      = $adapter;
-
 
92
        $this->cache        = $cache;
93
        $this->adapter      = $adapter;
93
        $this->logger       = $logger;
94
        $this->logger       = $logger;
-
 
95
        $this->config       = $config;
94
        $this->config       = $config;
96
        $this->cache = CacheImpl::getInstance($config);
Línea 95... Línea 97...
95
    }
97
    }
96
    
98
    
97
    public function indexAction()
99
    public function indexAction()
Línea 1114... Línea 1116...
1114
    
1116
    
1115
    
1117
    
1116
    
1118
    
1117
    public function addFundAction()
1119
    public function addFundAction()
1118
    {
1120
    {
Línea 1119... Línea 1121...
1119
        /*
1121
 
1120
        $request = $this->request;
1122
        $request = $this->request;
Línea 1154... Línea 1156...
1154
                    $environment = new ProductionEnvironment($client_id, $client_secret);
1156
                    $environment = new ProductionEnvironment($client_id, $client_secret);
1155
                }
1157
                }
Línea 1156... Línea 1158...
1156
                
1158
                
1157
                $internal_id = uniqid(Provider::PAYPAL, true);
1159
                $internal_id = uniqid(Provider::PAYPAL, true);
1158
                $client = new PayPalHttpClient($environment);
1160
                $client = new PayPalHttpClient($environment);
Línea 1159... Línea 1161...
1159
                $request = new OrdersCreateRequest;
1161
                $request = new OrdersCreateRequest();
1160
                
1162
                
1161
                
1163
                
Línea 1223... Línea 1225...
1223
                        $transaction->description = $description;
1225
                        $transaction->description = $description;
1224
                        $transaction->request = json_encode($response, JSON_PRETTY_PRINT);
1226
                        $transaction->request = json_encode($response, JSON_PRETTY_PRINT);
Línea 1225... Línea 1227...
1225
                        
1227
                        
Línea 1226... Línea 1228...
1226
                        $requestId = Provider::PAYPAL . '-' . $external_id;
1228
                        $requestId = Provider::PAYPAL . '-' . $external_id;
Línea 1227... Línea 1229...
1227
                        
1229
                        
Línea 1264... Línea 1266...
1264
            
1266
            
Línea 1265... Línea 1267...
1265
            }
1267
            }
1266
            
1268
            
1267
        } else {
1269
        } else {
1268
            return new JsonModel(['success' => false, 'data' => 'ERROR_METHOD_NOT_ALLOWED' ]);
1270
            return new JsonModel(['success' => false, 'data' => 'ERROR_METHOD_NOT_ALLOWED' ]);
Línea 1269... Línea 1271...
1269
        }*/
1271
        }/
1270
    }
1272
    }
1271
    
1273