Plugin Directory

Changeset 1883769


Ignore:
Timestamp:
05/30/2018 05:13:37 AM (8 years ago)
Author:
codexdemon
Message:

Issued Fixed As Reported Github #44 and #48

Location:
campt-indian-payment-gateway
Files:
163 added
7 edited

Legend:

Unmodified
Added
Removed
  • campt-indian-payment-gateway/assets/icon.svg

    r1702222 r1883769  
    1 <?xml version="1.0" encoding="UTF-8"?>
    2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
    3 <!-- Creator: CorelDRAW X7 -->
    4 <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="8.26772in" height="11.6929in" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd"
    5 viewBox="0 0 8268 11693"
    6  xmlns:xlink="http://www.w3.org/1999/xlink"
    7  enable-background="new 0 0 250 250">
    8  <defs>
    9   <style type="text/css">
    10    <![CDATA[
    11     .fil3 {fill:#FEFEFE}
    12     .fil4 {fill:#00007A}
    13     .fil6 {fill:#006600}
    14     .fil2 {fill:#53CF19}
    15     .fil1 {fill:#53CF19}
    16     .fil0 {fill:#FEFEFE}
    17     .fil5 {fill:#FF6600}
    18    ]]>
    19   </style>
    20  </defs>
    21  <g id="Layer_x0020_1">
    22   <metadata id="CorelCorpID_0Corel-Layer"/>
    23   <rect class="fil0" x="2356" y="4069" width="3556" height="3556"/>
    24   <polygon class="fil1" points="4891,5034 3067,5522 3377,6681 5201,6191 "/>
    25   <path class="fil2" d="M5486 5165l-152 -562 -2862 765 152 563c162,-44 330,53 373,215 43,162 -53,330 -215,373l154 571 2860 -766 -154 -570c-162,43 -331,-53 -374,-215 -41,-164 54,-331 218,-374zm-183 1086l-1984 531 -355 -1319 1984 -532 355 1320z"/>
    26   <circle class="fil3" transform="matrix(0.386814 -0.109859 0.109859 0.386814 4126.33 5845.19)" r="1278"/>
    27   <g id="_1328786594720">
    28    <path class="fil4" d="M3832 5538l369 -105c3,-1 5,1 5,3l13 44c1,3 0,5 -3,5l-111 32 1 4c29,6 56,28 82,66l5 13 64 -18c3,0 5,1 5,3l13 44c1,3 0,5 -3,5l-59 17c14,50 -3,106 -50,170 -45,47 -79,73 -101,79 0,2 -1,2 -4,3l341 253 2 4 -95 27c-1,0 -133,-98 -396,-294l-1 -2 30 -8c106,-30 159,-86 159,-169 -1,-9 -3,-17 -4,-22l-2 -6 -172 48c-2,1 -4,0 -5,-2l-12 -45c-1,-2 0,-4 2,-5l170 -48c-16,-27 -39,-49 -71,-58 -40,-11 -75,-9 -104,-1l-53 15c-3,1 -5,0 -5,-3l-13 -44c-1,-2 1,-4 3,-5z"/>
    29    <polygon class="fil5" points="3814,5542 4267,5413 4251,5487 3798,5616 "/>
    30    <polygon class="fil6" points="3856,5692 4310,5563 4294,5637 3840,5766 "/>
    31   </g>
    32  </g>
     1<?xml version="1.0" encoding="utf-8"?>
     2<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
     3<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
     4     viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve">
     5<style type="text/css">
     6    .st0{fill:none;}
     7</style>
     8<rect y="0" class="st0" width="20" height="20"/>
     9<path d="M4.8,12.2H4c-0.4,0-0.8,0.3-0.8,0.8v4c0,0.4,0.3,0.8,0.8,0.8h8c0.4,0,0.8-0.3,0.8-0.8v-1.9l-3.3-1.2v0.2H8.7
     10    c-0.1,0.7-0.6,1.2-1.5,1.2c0.5,0.6,1.1,1.3,1.7,2H8.2c-0.5-0.7-1.1-1.3-1.7-2v-0.4h0.4c0.8,0,1.2-0.3,1.2-0.8H6.5v-0.4h1.6
     11    C8,13.3,7.6,13.1,7,13.1H6.5v-0.3L4.8,12.2z"/>
     12<path d="M14.8,16.6c-0.3-0.3-0.6-0.6-0.7-1l-0.8-0.3V17c0,0.7-0.6,1.2-1.2,1.2H4c-0.7,0-1.2-0.6-1.2-1.2v-4c0-0.6,0.4-1,0.9-1.2
     13    l-2.9-1L1,10H0v3c0.5,0,1,0.2,1.4,0.6C1.8,14,2,14.5,2,15c0,0.6-0.2,1-0.6,1.4C1,16.8,0.5,17,0,17v3h16v-3h0
     14    C15.5,17,15.1,16.9,14.8,16.6z"/>
     15<path d="M20,6.4L4.9,1l-1,2.9c0.5,0.2,0.9,0.5,1.1,1c0.2,0.5,0.3,1,0.1,1.5c-0.2,0.5-0.5,0.9-1,1.1c-0.5,0.2-1,0.3-1.5,0.1l-1,2.8
     16    l15.1,5.4l1-2.8v0c-0.5-0.2-0.9-0.5-1.2-1c-0.2-0.5-0.3-1-0.1-1.5c0.2-0.5,0.5-0.9,1-1.1s1-0.3,1.5-0.1v0L20,6.4z M16.4,8.3L15,12.1
     17    c-0.2,0.5-0.7,0.8-1.2,0.8c-0.1,0-0.3,0-0.4-0.1l-7.5-2.7c-0.6-0.2-1-1-0.7-1.6l1.4-3.8c0.2-0.6,1-1,1.6-0.7l7.5,2.7
     18    c0.3,0.1,0.6,0.3,0.7,0.6S16.5,8,16.4,8.3z"/>
     19<path d="M8.7,13.6c0,0,0,0.1,0,0.1H9L8.7,13.6z"/>
     20<path d="M15.9,7.6c-0.1-0.2-0.2-0.3-0.4-0.4L8,4.5c-0.1,0-0.2,0-0.3,0C7.4,4.4,7.1,4.6,7,4.9L5.6,8.7C5.5,9,5.7,9.5,6.1,9.6l7.5,2.7
     21    c0.4,0.1,0.8-0.1,1-0.4l1.4-3.8C16,8,16,7.8,15.9,7.6z M12.8,7.1l-1.1-0.4c0.1,0.2,0.2,0.5,0.1,0.8l0.7,0.3l-0.1,0.3l-0.7-0.3
     22    c-0.3,0.6-1,0.9-1.9,0.6c0.3,0.7,0.6,1.6,0.9,2.5l-0.6-0.2C9.9,9.8,9.7,9.1,9.3,8.2l0.1-0.4l0.4,0.1C10.5,8.2,11,8,11.2,7.6L9.7,7
     23    l0.1-0.3l1.5,0.5c0-0.4-0.2-0.7-0.8-0.9L10,6.1l0.2-0.4l2.8,1L12.8,7.1z"/>
    3324</svg>
  • campt-indian-payment-gateway/trunk/campt-indian-payment-gateway.php

    r1752439 r1883769  
    66 * Author: India WordPress Community
    77 * Author URI: https://github.com/wpindiaorg/
    8  * Version: 1.6
     8 * Version: 1.7
    99 * License: GPLv2 or later
    1010 * Text Domain: campt-indian-payment-gateway
  • campt-indian-payment-gateway/trunk/inc/instamojo/class-camptix-payment-method-instamojo.php

    r1752439 r1883769  
    249249       
    250250        $phone = ltrim( $extra_info['phone'], '0' );
    251 
    252         if ( strlen($phone) > 10 ) {
    253             $attendee_phone = substr( $phone, -10 );
    254             $attendee_phone = ltrim( $attendee_phone, '0' );
    255             if ( strlen($attendee_phone) <= 9 ) {
    256                 $attendee_phone = str_pad( $attendee_phone, 10, '9', STR_PAD_LEFT);
    257              
    258         }
    259         } elseif ( strlen($phone) <= 9 ) {
    260              $attendee_phone = str_pad( $phone, 10, '9', STR_PAD_LEFT);
    261         }else{
    262             $attendee_phone = '9999999999';
    263         }
    264 
     251        $phone = ltrim( $phone, '+91' ); // Remove '+91' CountyCode of India : Not supported by Instamojo. issue #43, #46
     252        $phone = ltrim( $phone, '+' ); // Remove '+' for international attendee : Not supported by Instamojo. issue #43, #46
     253        $phone = str_replace( array( ' ', '-', '.' ), '', $phone ); // Remove special characters : Not supported by Instamojo. issue #43, #46
     254        if ( strlen($phone) > 10 ) {
     255            $attendee_phone = substr( $phone, -10 );
     256            $attendee_phone = ltrim( $attendee_phone, '0' );
     257            if ( strlen($attendee_phone) <= 9 ) {
     258            $attendee_phone = str_pad( $attendee_phone, 10, '9', STR_PAD_LEFT);
     259            }
     260        } elseif ( strlen($phone) <= 9 ) {
     261             $attendee_phone = str_pad( $phone, 10, '9', STR_PAD_LEFT);
     262        } else {
     263            $attendee_phone = $phone; // Instamojo is expecting a 10 digit value.
     264        }
     265
     266        // Indian mobile numbers start with 9,8,7, or 6. issue #43, #46
     267        if ( ! preg_match( "/^[6-9][0-9]{9}$/", $attendee_phone ) ) {
     268            $attendee_phone = '9999999999'; // No clearity about international number via API; thus using the example.
     269        }
     270       
    265271        $payload = Array(
    266             'purpose'                 => $productinfo,
     272            'purpose'                 => str_pad( $productinfo, 30, '' ), // Instamojo expects the minimum 30 characters. issue #45
    267273            'amount'                  => $order_amount,
    268274            'phone'                   => $attendee_phone,
  • campt-indian-payment-gateway/trunk/readme.txt

    r1752439 r1883769  
    33Tags:              camptix, camptix payment, event ticketing, razorpay, instamojo, Indian payment, camptix Indian gateway, camptix payment gateway
    44Requires at least: 3.5
    5 Tested up to:      4.8
    6 Stable tag:        1.6
     5Tested up to:      4.9.6
     6Stable tag:        1.7
    77License:           GPLv2 or later
    88License URI:       http://www.gnu.org/licenses/gpl-2.0.html
     
    4747
    4848== Changelog ==
     49=1.7=
     50* FIX: Hardcoded attendee phone - Github issue [#43](https://github.com/wpindiaorg/camptix-indian-payments/issues/43), [#46](https://github.com/wpindiaorg/camptix-indian-payments/issues/46)
     51* FIX: Charachter length of 30 - Github issue [#45](https://github.com/wpindiaorg/camptix-indian-payments/issues/45)
     52
    4953=1.5=
    5054JavaScript breaks registration flow for Instamojo #41 Fixed
Note: See TracChangeset for help on using the changeset viewer.