Our site uses PayPal Payflo. The problem with it is that it seems very eurocentric.
It offers four credit card choices: Visa, Mastercard, Maestro, and Solo. (Maestro and Solo are cards we haven't really heard of, and don't want them listed).
It asks for a "card valid from date" and a "card Expiry date" (we don't need the "card valid from date")
Its asks for "Card issue number" ... we don't even know what that is.
So we have done the easiest thing, changing "expiry" to "expiration date". (by going to catalog/language/english/payment/pp_payflow.php and tweaking the "entry_cc_expire_date" language).
But, how do we remove the following?
Card Valid From Date
Card Issue Number
Do I code out the sections in the catalog/controller/payment/pp_payflow.php? :
$data['entry_cc_start_date'] = $this->language->get('entry_cc_start_date');
and
$data['entry_cc_issue'] = $this->language->get('entry_cc_issue');
And lastly, and this is the biggie; can we ADD American Express? We KNOW it works. We've had customers select Mastercard (I believe), but type in their AmEx card into the card number, and it was accepted and it works. It seems like the module passes along the "card type" to paypal, but paypal simply looks at the credit card number and determines if it's Amex, Mastercard, or whatever and uses that for card type, regardless as to whether people select it.
So I'm wondering about the following section in the controller file:
$data['cards'] = array();
$data['cards'][] = array(
'text' => 'Visa',
'value' => '0'
);
$data['cards'][] = array(
'text' => 'MasterCard',
'value' => '1'
);
$data['cards'][] = array(
'text' => 'Maestro',
'value' => '9'
);
$data['cards'][] = array(
'text' => 'Solo',
'value' => 'S'
);
On this page: https://developer.paypal.com/docs/class ... ion-guide/ I found AmEx listed as value "3" under "CardType"
So perhaps I can code out the maestro and solo parts, and put in the following:
$data['cards'][] = array(
'text' => 'American Express',
'value' => '3'
);
Does that look right? Should that work?
Any advice and help is appreciated!!!!
It offers four credit card choices: Visa, Mastercard, Maestro, and Solo. (Maestro and Solo are cards we haven't really heard of, and don't want them listed).
It asks for a "card valid from date" and a "card Expiry date" (we don't need the "card valid from date")
Its asks for "Card issue number" ... we don't even know what that is.
So we have done the easiest thing, changing "expiry" to "expiration date". (by going to catalog/language/english/payment/pp_payflow.php and tweaking the "entry_cc_expire_date" language).
But, how do we remove the following?
Card Valid From Date
Card Issue Number
Do I code out the sections in the catalog/controller/payment/pp_payflow.php? :
$data['entry_cc_start_date'] = $this->language->get('entry_cc_start_date');
and
$data['entry_cc_issue'] = $this->language->get('entry_cc_issue');
And lastly, and this is the biggie; can we ADD American Express? We KNOW it works. We've had customers select Mastercard (I believe), but type in their AmEx card into the card number, and it was accepted and it works. It seems like the module passes along the "card type" to paypal, but paypal simply looks at the credit card number and determines if it's Amex, Mastercard, or whatever and uses that for card type, regardless as to whether people select it.
So I'm wondering about the following section in the controller file:
$data['cards'] = array();
$data['cards'][] = array(
'text' => 'Visa',
'value' => '0'
);
$data['cards'][] = array(
'text' => 'MasterCard',
'value' => '1'
);
$data['cards'][] = array(
'text' => 'Maestro',
'value' => '9'
);
$data['cards'][] = array(
'text' => 'Solo',
'value' => 'S'
);
On this page: https://developer.paypal.com/docs/class ... ion-guide/ I found AmEx listed as value "3" under "CardType"
So perhaps I can code out the maestro and solo parts, and put in the following:
$data['cards'][] = array(
'text' => 'American Express',
'value' => '3'
);
Does that look right? Should that work?
Any advice and help is appreciated!!!!
To remove the Card Valid From Date and Card Issue Number you need to remove the following from catalog/view/theme/default/template/payment/pp_pro_pf.tpl.
https://github.com/opencart/opencart/bl ... pl#L20-L34
And https://github.com/opencart/opencart/bl ... pl#L53-L57
Then from catalog/controller/payment/pp_pro_pf.php
https://github.com/opencart/opencart/bl ... f.php#L118
And
https://github.com/opencart/opencart/bl ... f.php#L121
What you suggest for the card type looks right. Although you could remove https://github.com/opencart/opencart/bl ... f.php#L117 and https://github.com/opencart/opencart/bl ... tpl#L8-L15 altogether as ACCTTYPE has been removed according to your link.
https://github.com/opencart/opencart/bl ... pl#L20-L34
Code: Select all
<tr>
<td><?php echo $entry_cc_start_date; ?></td>
<td><select name="cc_start_date_month">
<?php foreach ($months as $month) { ?>
<option value="<?php echo $month['value']; ?>"><?php echo $month['text']; ?></option>
<?php } ?>
</select>
/
<select name="cc_start_date_year">
<?php foreach ($year_valid as $year) { ?>
<option value="<?php echo $year['value']; ?>"><?php echo $year['text']; ?></option>
<?php } ?>
</select>
<?php echo $text_start_date; ?></td>
</tr>
Code: Select all
<tr>
<td><?php echo $entry_cc_issue; ?></td>
<td><input type="text" name="cc_issue" value="" size="1" />
<?php echo $text_issue; ?></td>
</tr>
https://github.com/opencart/opencart/bl ... f.php#L118
Code: Select all
$request .= '&CARDSTART=' . urlencode($this->request->post['cc_start_date_month'] . substr($this->request->post['cc_start_date_year'], - 2, 2));
https://github.com/opencart/opencart/bl ... f.php#L121
Code: Select all
$request .= '&CARDISSUE=' . urlencode($this->request->post['cc_issue']);
Thank you so much! I will give this a shot this weekend; I'll report back on success or problems! Thanks again.
It did work; though its been a long time and I can't remember the specifics.
But the part I included from the controller file, for adding AmEx and getting rid of the solo and maestro cards etc worked perfectly. It's kind of annoying that I had to did into the weeds to make this work. It was honestly almost blind luck that I found those codes for the various credit cards... but yeah I did get it to work and I'm pretty sure I followed the stuff below to finish getting it all to work.
But the part I included from the controller file, for adding AmEx and getting rid of the solo and maestro cards etc worked perfectly. It's kind of annoying that I had to did into the weeds to make this work. It was honestly almost blind luck that I found those codes for the various credit cards... but yeah I did get it to work and I'm pretty sure I followed the stuff below to finish getting it all to work.
I am running Opencart Version 2.3.0.2 and using "PayPal Payflow Pro"
We need to remove "Card Valid From Date" and "Card Issue Number" because it is really confusing our US customers.
Which is a big problem because we only sell to the US.
Your instructions don't match what I have and I am little confused. The path names we have don't match to what you have. Not to mention, multiple files are over the place.
Can you clarify the steps?
We need to remove "Card Valid From Date" and "Card Issue Number" because it is really confusing our US customers.
Which is a big problem because we only sell to the US.
Your instructions don't match what I have and I am little confused. The path names we have don't match to what you have. Not to mention, multiple files are over the place.
Can you clarify the steps?
For version 2.3.0.2 the files may be in the following locations, unless you are using the iframe version.
catalog/view/theme/default/template/extension/payment/pp_payflow.tpl
catalog/controller/extension/payment/pp_payflow.php
catalog/view/theme/default/template/extension/payment/pp_payflow.tpl
catalog/controller/extension/payment/pp_payflow.php
Thanks,
So those are the only two files I need to focus my attention on? One TPL and one PHP?
What exact files and where has gotten pretty muddy in all the discussions.
So those are the only two files I need to focus my attention on? One TPL and one PHP?
What exact files and where has gotten pretty muddy in all the discussions.
That looks to be where the files were moved to. Then try and find the code matching the parts in this post, viewtopic.php?p=616609#p616609 to see what needs to be removed.
Hey Everyone.
I'm on 2.3.0. I just added Paypal Payflow today 10/3/18. I made 4 changes.
In: /public_html/catalog/language/en-gb/extension/payment/pp_express.php
I changed PayPal Express Checkout to Paypal under text_title.
In: /public_html/catalog/language/en-gb/extension/payment/pp_payflow.php
I changed Expiry to 'Card Expiration Date' under 'entry_cc_expire_date'
In: /public_html/catalog/view/theme/default/template/extension/payment/pp_payflow.tpl
I removed the two sections below pertaining to 'card valid from' and the 'card issue number' sections.
Card Valid from section:
Card Issue section:
In: /public_html/catalog/controller/extension/payment/pp_payflow.php
I removed the 'request' sections for card start and card issue below.
This seemed to work well for me. Hope it helps someone else.
I'm on 2.3.0. I just added Paypal Payflow today 10/3/18. I made 4 changes.
In: /public_html/catalog/language/en-gb/extension/payment/pp_express.php
I changed PayPal Express Checkout to Paypal under text_title.
Code: Select all
<?php
// Heading
$_['express_text_title'] = 'Confirm order';
// Text
$_['text_title'] = 'PayPal';
$_['text_cart'] = 'Shopping Cart';
$_['text_shipping_updated'] = 'Shipping service updated';
$_['text_trial'] = '%s every %s %s for %s payments then ';
$_['text_recurring'] = '%s every %s %s';
$_['text_recurring_item'] = 'Recurring Item';
$_['text_length'] = ' for %s payments';
// Entry
$_['express_entry_coupon'] = 'Enter your coupon here:';
// Button
$_['button_express_coupon'] = 'Add';
$_['button_express_confirm'] = 'Confirm';
$_['button_express_login'] = 'Continue to PayPal';
$_['button_express_shipping'] = 'Update shipping';
// Error
$_['error_heading_title'] = 'There was an error';
$_['error_too_many_failures'] = 'Your payment has failed too many times';
I changed Expiry to 'Card Expiration Date' under 'entry_cc_expire_date'
Code: Select all
<?php
// Text
$_['text_title'] = 'Credit or Debit Card';
$_['text_credit_card'] = 'Credit Card Details';
$_['text_start_date'] = '(if available)';
$_['text_issue'] = '(for Maestro and Solo cards only)';
$_['text_wait'] = 'Please wait!';
// Entry
$_['entry_cc_owner'] = 'Card Owner:';
$_['entry_cc_type'] = 'Card Type:';
$_['entry_cc_number'] = 'Card Number:';
$_['entry_cc_start_date'] = 'Card Valid From Date:';
$_['entry_cc_expire_date'] = 'Card Expiration Date:';
$_['entry_cc_cvv2'] = 'Card Security Code (CVV2):';
$_['entry_cc_issue'] = 'Card Issue Number:';
// Error
$_['error_required'] = 'Warning: All payment information fields are required.';
$_['error_general'] = 'Warning: A general problem has occurred with the transaction. Please try again.';
$_['error_config'] = 'Warning: Payment module configuration error. Please verify the login credentials.';
$_['error_address'] = 'Warning: A match of the Payment Address City, State, and Postal Code failed. Please try again.';
$_['error_declined'] = 'Warning: This transaction has been declined. Please try again.';
$_['error_invalid'] = 'Warning: The provided credit card information is invalid. Please try again.';
I removed the two sections below pertaining to 'card valid from' and the 'card issue number' sections.
Card Valid from section:
Code: Select all
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-cc-start-date"><?php echo $entry_cc_start_date; ?></label>
<div class="col-sm-3">
<select name="cc_start_date_month" id="input-cc-start-date" class="form-control">
<?php foreach ($months as $month) { ?>
<option value="<?php echo $month['value']; ?>"><?php echo $month['text']; ?></option>
<?php } ?>
</select>
</div>
<div class="col-sm-3">
<select name="cc_start_date_year" class="form-control">
<?php foreach ($year_valid as $year) { ?>
<option value="<?php echo $year['value']; ?>"><?php echo $year['text']; ?></option>
<?php } ?>
</select>
</div>
</div>
Code: Select all
<div class="form-group">
<label class="col-sm-2 control-label" for="input-cc-issue"><?php echo $entry_cc_issue; ?></label>
<div class="col-sm-10">
<input type="text" name="cc_issue" value="" placeholder="<?php echo $entry_cc_issue; ?>" id="input-cc-issue" class="form-control" />
</div>
</div>
I removed the 'request' sections for card start and card issue below.
Code: Select all
$request .= '&CARDSTART=' . urlencode($this->request->post['cc_start_date_month'] . substr($this->request->post['cc_start_date_year'], - 2, 2));
$request .= '&CARDISSUE=' . urlencode($this->request->post['cc_issue']);
Who is online
Users browsing this forum: No registered users and 85 guests