mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 02:07:33 -05:00 
			
		
		
		
	Reference customer when paying with Checkout.com
This commit is contained in:
		
							parent
							
								
									e7a9576fd4
								
							
						
					
					
						commit
						d0665e8311
					
				@ -112,7 +112,7 @@ class CreditCard implements MethodInterface
 | 
				
			|||||||
        $data['currency'] = $this->checkout->client->getCurrencyCode();
 | 
					        $data['currency'] = $this->checkout->client->getCurrencyCode();
 | 
				
			||||||
        $data['value'] = $this->checkout->convertToCheckoutAmount($data['total']['amount_with_fee'], $this->checkout->client->getCurrencyCode());
 | 
					        $data['value'] = $this->checkout->convertToCheckoutAmount($data['total']['amount_with_fee'], $this->checkout->client->getCurrencyCode());
 | 
				
			||||||
        $data['raw_value'] = $data['total']['amount_with_fee'];
 | 
					        $data['raw_value'] = $data['total']['amount_with_fee'];
 | 
				
			||||||
        $data['customer_email'] = $this->checkout->client->present()->email;
 | 
					        $data['customer_email'] = $this->checkout->client->present()->email();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return render('gateways.checkout.credit_card.pay', $data);
 | 
					        return render('gateways.checkout.credit_card.pay', $data);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -173,6 +173,10 @@ class CreditCard implements MethodInterface
 | 
				
			|||||||
        $payment = new Payment($method, $this->checkout->payment_hash->data->currency);
 | 
					        $payment = new Payment($method, $this->checkout->payment_hash->data->currency);
 | 
				
			||||||
        $payment->amount = $this->checkout->payment_hash->data->value;
 | 
					        $payment->amount = $this->checkout->payment_hash->data->value;
 | 
				
			||||||
        $payment->reference = $this->checkout->getDescription();
 | 
					        $payment->reference = $this->checkout->getDescription();
 | 
				
			||||||
 | 
					        $payment->customer = [
 | 
				
			||||||
 | 
					            'name' => $this->checkout->client->present()->name() ,
 | 
				
			||||||
 | 
					            'email' => $this->checkout->client->present()->email(),
 | 
				
			||||||
 | 
					        ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $this->checkout->payment_hash->data = array_merge((array)$this->checkout->payment_hash->data, ['checkout_payment_ref' => $payment]);
 | 
					        $this->checkout->payment_hash->data = array_merge((array)$this->checkout->payment_hash->data, ['checkout_payment_ref' => $payment]);
 | 
				
			||||||
        $this->checkout->payment_hash->save();
 | 
					        $this->checkout->payment_hash->save();
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user