Revision 556

Date:
2016/03/23 11:56:38
Author:
ahitrov
Revision Log:
Production mode changes

Files:

Legend:

 
Added
 
Removed
 
Modified
  • utf8/plugins/payments/config.proto

     
    39 39 # payture.ru
    40 40 ############################################################
    41 41 PTR_ID =
    42 PTR_SECRET =
    43 PTR_BACKEND_SECRET =
    42 PTR_SECRET = 123
    44 43 PTR_CURRENCY_CODE = RUB
    45 44 PTR_TEST_MODE = 1 # 0 - для боевого режима
    46 45
    47 REWRITE += PTR_ID PTR_SECRET PTR_BACKEND_SECRET
    46 REWRITE += PTR_ID PTR_SECRET PTR_CURRENCY_CODE PTR_TEST_MODE
    48 47 ############################################################
    49 48 # /payture.ru
    50 49
  • utf8/plugins/payments/lib/payments/Provider/PayTure.pm

     
    27 27 $self->{currency} = $state->{payments}->{$prefix."_currency_code"};
    28 28 $self->{test_mode} = $state->{payments}->{$prefix."_test_mode"};
    29 29
    30 $self->{api} = $self->{test_mode} ?
    31 {
    32 init => 'https://sandbox.payture.com/apim/Init',
    33 pay => 'https://sandbox.payture.com/apim/Pay',
    34 status => 'https://sandbox.payture.com/apim/PayStatus',
    35 } : {
    30 my $host = $self->{test_mode} ? 'sandbox' : 'secure';
    31 $self->{api} = {
    32 init => "https://$host.payture.com/apim/Init",
    33 pay => "https://$host.payture.com/apim/Pay",
    34 status => "https://$host.payture.com/apim/PayStatus",
    36 35 };
    37 36 $self->{result} = {};
    38 37
     
    126 125 $self->{result}{transaction} = $transaction;
    127 126 } else {
    128 127 my $ua = LWP::UserAgent->new;
    129 my $is_https = $ua->is_protocol_supported( 'https' );
    130 warn "PayTure Init: protocol 'https' is $is_https\n" if $DEBUG;
    128 if ( $DEBUG ) {
    129 my $is_https = $ua->is_protocol_supported( 'https' );
    130 warn "PayTure Init: protocol 'https' is $is_https\n";
    131 }
    131 132 $ua->agent('Mozilla/5.0');
    132 $ua->ssl_opts( verify_hostname => 0, SSL_ca_path => '/usr/local/share/certs' );
    133 133 my $req = URI->new( $self->{api}{init} );
    134 134 my @data = ( "SessionType=$session_type", "OrderId=$order_id", "Amount=$sum", "IP=$ip");
    135 135 push @data, "Url=$url" if $url;
  • utf8/plugins/payments/lib/payments/State.pm.proto

     
    67 67
    68 68 $self->{payture_app_id} = '@PTR_ID@';
    69 69 $self->{payture_app_secret} = '@PTR_SECRET@';
    70 $self->{payture_backend_secret} = '@PTR_BACKEND_SECRET@';
    71 70 $self->{payture_currency_code} = '@PTR_CURRENCY_CODE@';
    72 71 $self->{payture_test_mode} = int('@PTR_TEST_MODE@' || 0);
    73 72 $self->{payture_sig_code} = '@PTR_SIG_CODE@';