mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Add phone country code field to pui gateway box
This commit is contained in:
parent
936c2d13cf
commit
d99fdb15d3
2 changed files with 12 additions and 1 deletions
|
@ -111,6 +111,16 @@ class PayUponInvoice {
|
||||||
'clear' => true,
|
'clear' => true,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
woocommerce_form_field(
|
||||||
|
'phone_country_code',
|
||||||
|
array(
|
||||||
|
'type' => 'number',
|
||||||
|
'label' => __('Phone country code (ex. 49)', 'woocommerce-paypal-payments'),
|
||||||
|
'class' => array('form-row-wide'),
|
||||||
|
'required' => true,
|
||||||
|
'clear' => true,
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
echo '</div><div>';
|
echo '</div><div>';
|
||||||
_e( 'By clicking on the button, you agree to the <a href="https://www.ratepay.com/legal-payment-terms">terms of payment</a> and <a href="https://www.ratepay.com/legal-payment-dataprivacy">performance of a risk check</a> from the payment partner, Ratepay. You also agree to PayPal’s <a href="https://www.paypal.com/de/webapps/mpp/ua/privacy-full?locale.x=eng_DE&_ga=1.267010504.718583817.1563460395">privacy statement</a>. If your request to purchase upon invoice is accepted, the purchase price claim will be assigned to Ratepay, and you may only pay Ratepay, not the merchant.', 'woocommerce-paypal-payments' );
|
_e( 'By clicking on the button, you agree to the <a href="https://www.ratepay.com/legal-payment-terms">terms of payment</a> and <a href="https://www.ratepay.com/legal-payment-dataprivacy">performance of a risk check</a> from the payment partner, Ratepay. You also agree to PayPal’s <a href="https://www.paypal.com/de/webapps/mpp/ua/privacy-full?locale.x=eng_DE&_ga=1.267010504.718583817.1563460395">privacy statement</a>. If your request to purchase upon invoice is accepted, the purchase price claim will be assigned to Ratepay, and you may only pay Ratepay, not the merchant.', 'woocommerce-paypal-payments' );
|
||||||
|
|
|
@ -9,6 +9,7 @@ class PaymentSourceFactory {
|
||||||
public function from_wc_order( WC_Order $order ) {
|
public function from_wc_order( WC_Order $order ) {
|
||||||
$address = $order->get_address();
|
$address = $order->get_address();
|
||||||
$birth_date = filter_input( INPUT_POST, 'billing_birth_date', FILTER_SANITIZE_STRING );
|
$birth_date = filter_input( INPUT_POST, 'billing_birth_date', FILTER_SANITIZE_STRING );
|
||||||
|
$phone_country_code = filter_input( INPUT_POST, 'phone_country_code', FILTER_SANITIZE_STRING );
|
||||||
|
|
||||||
return new PaymentSource(
|
return new PaymentSource(
|
||||||
$address['first_name'] ?? '',
|
$address['first_name'] ?? '',
|
||||||
|
@ -16,7 +17,7 @@ class PaymentSourceFactory {
|
||||||
$address['email'] ?? '',
|
$address['email'] ?? '',
|
||||||
$birth_date ?? '',
|
$birth_date ?? '',
|
||||||
$address['phone'] ?? '',
|
$address['phone'] ?? '',
|
||||||
'49',
|
$phone_country_code ?? '',
|
||||||
$address['address_1'] ?? '',
|
$address['address_1'] ?? '',
|
||||||
$address['city'] ?? '',
|
$address['city'] ?? '',
|
||||||
$address['postcode'] ?? '',
|
$address['postcode'] ?? '',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue